reformat all nix code
1 file changed, 41 insertions(+), 16 deletions(-)
changed files
M system/settings/services/git-server.nix → system/settings/services/git-server.nix
@@ -1,10 +1,16 @@ -{ config -, lib -, pkgs -, ... +{ + config, + lib, + pkgs, + ... }: let - inherit (lib) pipe flatten concatMapAttrs mapAttrsToList; + inherit (lib) + pipe + flatten + concatMapAttrs + mapAttrsToList + ; inherit (import ../../../lib/caddy.nix { inherit lib; }) security-headers; domain = "alin.ovh";@@ -28,22 +34,41 @@ }; }; repoMirrors = { - nixfiles = [ "sourcehut" "codeberg" ]; - searchix = [ "sourcehut" "codeberg" ]; + nixfiles = [ + "sourcehut" + "codeberg" + ]; + searchix = [ + "sourcehut" + "codeberg" + ]; website = [ "sourcehut" ]; homestead = [ "sourcehut" ]; legit = [ "github" ]; elgit = [ "codeberg" ]; - gomponents = [ "sourcehut" "github" ]; - nix-packages = [ "sourcehut" "github" ]; - zola-bearblog = [ "sourcehut" "codeberg" ]; + gomponents = [ + "sourcehut" + "github" + ]; + nix-packages = [ + "sourcehut" + "github" + ]; + zola-bearblog = [ + "sourcehut" + "codeberg" + ]; }; createMirrorService = - name: { hostname, username }: + name: + { hostname, username }: { "mirror-to-${name}@" = { - path = with pkgs; [ gitMinimal openssh ]; + path = with pkgs; [ + gitMinimal + openssh + ]; serviceConfig = { Type = "oneshot"; User = "gitolite";@@ -57,7 +82,9 @@ }; }; }; - createMirrorPath = name: { ... }: + createMirrorPath = + name: + { ... }: { "mirror-to-${name}@" = { pathConfig = {@@ -67,7 +94,6 @@ StartLimitBurst = 5; }; }; }; - mkMirrorWants = repo: map (target: "mirror-to-${target}@${repo}.path"); in@@ -141,8 +167,7 @@ systemd.services = concatMapAttrs createMirrorService mirrors; systemd.paths = concatMapAttrs createMirrorPath mirrors; systemd.targets.git-mirroring = { wantedBy = [ "multi-user.target" ]; - wants = pipe - repoMirrors [ + wants = pipe repoMirrors [ (mapAttrsToList mkMirrorWants) flatten ];