flake

Francesco Saccone's Nix flake.
git clone https://git.francescosaccone.com/flake
Log | Files | Refs | README | LICENSE

commit f848402859a0c7a027c46da593615eb4ed74e63c
parent 2daf6d1f37eeaa65d968cd251822c6588798faf7
Author: Francesco Saccone <francesco@francescosaccone.com>
Date:   Thu, 15 May 2025 09:14:05 +0200

refactor: move git from 'modules' to 'services'

Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>

Diffstat:
Mmodules/nixos/git/daemon/default.nix | 10+++++-----
Mmodules/nixos/git/default.nix | 8++++----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/nixos/git/daemon/default.nix b/modules/nixos/git/daemon/default.nix @@ -6,7 +6,7 @@ ... }: { - options.modules.git.daemon = { + options.services.git.daemon = { enable = lib.mkOption { description = "Whether to enable the Git daemon."; default = false; @@ -16,9 +16,9 @@ config = let - inherit (config.modules.git) daemon; + inherit (config.services.git) daemon; in - lib.mkIf (config.modules.git.enable && daemon.enable) { + lib.mkIf (config.services.git.enable && daemon.enable) { systemd = { services = { git-daemon = { @@ -31,10 +31,10 @@ ${pkgs.git}/bin/git daemon \ --verbose \ --syslog \ - --base-path=${config.modules.git.directory} \ + --base-path=${config.services.git.directory} \ --port=9418 \ --export-all \ - ${config.modules.git.directory} + ${config.services.git.directory} ''; in { diff --git a/modules/nixos/git/default.nix b/modules/nixos/git/default.nix @@ -10,7 +10,7 @@ ./daemon ]; - options.modules.git = { + options.services.git = { enable = lib.mkOption { description = "Whether to set up a Git server."; default = false; @@ -61,7 +61,7 @@ }; }; - config = lib.mkIf config.modules.git.enable { + config = lib.mkIf config.services.git.enable { users = { users = { git = { @@ -69,7 +69,7 @@ isSystemUser = true; group = "git"; createHome = true; - home = config.modules.git.directory; + home = config.services.git.directory; shell = "${pkgs.git}/bin/git-shell"; }; }; @@ -90,7 +90,7 @@ wantedBy = [ "multi-user.target" ]; serviceConfig = let - inherit (config.modules.git) repositories directory; + inherit (config.services.git) repositories directory; script = repositories |> builtins.mapAttrs (