diff options
Diffstat (limited to 'nixos/modules/services/networking/git-daemon.nix')
-rw-r--r-- | nixos/modules/services/networking/git-daemon.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/services/networking/git-daemon.nix b/nixos/modules/services/networking/git-daemon.nix index 566936a7d0f..215ffe48a56 100644 --- a/nixos/modules/services/networking/git-daemon.nix +++ b/nixos/modules/services/networking/git-daemon.nix @@ -16,7 +16,7 @@ in type = types.bool; default = false; description = '' - Enable Git daemon, which allows public hosting of git repositories + Enable Git daemon, which allows public hosting of git repositories without any access controls. This is mostly intended for read-only access. You can allow write access by setting daemon.receivepack configuration @@ -115,10 +115,9 @@ in gid = config.ids.gids.git; }; - jobs.gitDaemon = { - name = "git-daemon"; - startOn = "ip-up"; - exec = "${pkgs.git}/bin/git daemon --reuseaddr " + systemd.services."git-daemon" = { + wantedBy = [ "ip-up.target" ]; + script = "${pkgs.git}/bin/git daemon --reuseaddr " + (optionalString (cfg.basePath != "") "--base-path=${cfg.basePath} ") + (optionalString (cfg.listenAddress != "") "--listen=${cfg.listenAddress} ") + "--port=${toString cfg.port} --user=${cfg.user} --group=${cfg.group} ${cfg.options} " |