zaphyra's git: nixfiles

zaphyra's nixfiles

commit d4b7629f0554cc261ddc04e2f3d855182ec8646f
parent 952da56fff7716bb6ad577dadf1d06ac9ba9e012
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 29 Aug 2025 13:16:14 +0200

nix-fmt
2 files changed, 34 insertions(+), 35 deletions(-)
M
config/nixos/modules/services/gitolite.nix
|
56
+++++++++++++++++++++++++++-----------------------------
M
flake.nix
|
13
+++++++------
diff --git a/config/nixos/modules/services/gitolite.nix b/config/nixos/modules/services/gitolite.nix
@@ -81,29 +81,28 @@ in
       commands = lib.mapAttrs (name: script: (pkgs.writeShellScript name script)) cfg.commands;
       manageGitoliteRc = cfg.extraGitoliteRc != "";
       rcDir = pkgs.runCommand "gitolite-rc" { preferLocalBuild = true; } rcDirScript;
-      rcDirScript =
-        ''
-          mkdir "$out"
-          export HOME=temp-home
-          mkdir -p "$HOME/.gitolite/logs" # gitolite can't run without it
-          '${pkgs.gitolite}'/bin/gitolite print-default-rc >>"$out/gitolite.rc.default"
-          cat <<END >>"$out/gitolite.rc"
-          # This file is managed by NixOS.
-          # Use services.gitolite options to control it.
-
-          END
-          cat "$out/gitolite.rc.default" >>"$out/gitolite.rc"
-        ''
-        + lib.optionalString (cfg.extraGitoliteRc != "") ''
-          echo -n ${lib.escapeShellArg ''
-
-            # Added by NixOS:
-            ${lib.removeSuffix "\n" cfg.extraGitoliteRc}
-
-            # per perl rules, this should be the last line in such a file:
-            1;
-          ''} >>"$out/gitolite.rc"
-        '';
+      rcDirScript = ''
+        mkdir "$out"
+        export HOME=temp-home
+        mkdir -p "$HOME/.gitolite/logs" # gitolite can't run without it
+        '${pkgs.gitolite}'/bin/gitolite print-default-rc >>"$out/gitolite.rc.default"
+        cat <<END >>"$out/gitolite.rc"
+        # This file is managed by NixOS.
+        # Use services.gitolite options to control it.
+
+        END
+        cat "$out/gitolite.rc.default" >>"$out/gitolite.rc"
+      ''
+      + lib.optionalString (cfg.extraGitoliteRc != "") ''
+        echo -n ${lib.escapeShellArg ''
+
+          # Added by NixOS:
+          ${lib.removeSuffix "\n" cfg.extraGitoliteRc}
+
+          # per perl rules, this should be the last line in such a file:
+          1;
+        ''} >>"$out/gitolite.rc"
+      '';
 
     in
     {

@@ -126,6 +125,11 @@ in
         group = cfg.group;
         extraGroups = [ "ssh" ];
         useDefaultShell = true;
+        packages = [
+          pkgs.gitolite
+          pkgs.git
+          pkgs.perl
+        ];
       };
 
       users.groups.${cfg.group}.gid = config.ids.gids.gitolite;

@@ -233,12 +237,6 @@ in
             gitolite setup # Upgrade if needed
           '';
       };
-
-      environment.systemPackages = [
-        pkgs.gitolite
-        pkgs.git
-        pkgs.perl
-      ];
     }
   );
 
diff --git a/flake.nix b/flake.nix
@@ -32,12 +32,12 @@
     in
     {
 
+      formatter = tgcLib.forAllSystems { body = pkgs: pkgs.nixfmt-rfc-style; };
+
       checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) (
         nixpkgsLib.filterAttrs (key: value: nixpkgsLib.hasSuffix "linux" key) inputs.deploy-rs.lib
       );
 
-      formatter = tgcLib.forAllSystems { body = pkgs: pkgs.nixfmt-rfc-style; };
-
       resources = loadDir [
         (inputs.haumea.lib.matchers.always pathLoader)
       ] ./resources;

@@ -285,17 +285,18 @@
 
     niriFlake.url = "github:sodiboo/niri-flake";
     niriFlake.inputs = {
-      nixpkgs.follows  = "nixpkgsUnstable";
-      nixpkgs-stable.follows  = "nixpkgs";
+      nixpkgs.follows = "nixpkgsUnstable";
+      nixpkgs-stable.follows = "nixpkgs";
     };
 
     sherlock.url = "github:Skxxtz/sherlock/8485f8720352c8ba48a4d74d3d33c882f9c0b35b";
     sherlock.inputs = {
-      nixpkgs.follows  = "nixpkgs";
+      nixpkgs.follows = "nixpkgs";
       flake-parts.follows = "flakeParts";
     };
 
-    tgcNUR.url = "git+https://git.transgirl.cafe/zaphyra/tgc-nix-user-repository";
+    #tgcNUR.url = "git+https://git.transgirl.cafe/zaphyra/tgc-nix-user-repository";
+    tgcNUR.url = "git+file:///home/zaphyra/proj/tgc-nix-user-repository";
     tgcNUR.inputs = {
       nixpkgs.follows = "nixpkgs";
       nixpkgsUnstable.follows = "nixpkgsUnstable";