all repos — nixfiles @ 0741f0290ee5e7082ff421921583ff9ad8ec6f1e

System and user configuration, managed by nix and home-manager

reformat all nix code

Alan Pearce
commit

0741f0290ee5e7082ff421921583ff9ad8ec6f1e

parent

83d9e0536997ccea2dde49e63d0f0f458f56ee61

1 file changed, 41 insertions(+), 16 deletions(-)

changed files
M system/settings/services/git-server.nixsystem/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 ];