From 0a2174f1952799994d053ba71b0b044c8239e2c0 Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Mon, 25 Jul 2016 21:22:51 +0200 Subject: nixos/lighttpd: move cgit setup to cgit.nix To where it really belongs. Separation of concern. --- nixos/modules/services/web-servers/lighttpd/cgit.nix | 5 +++++ nixos/modules/services/web-servers/lighttpd/default.nix | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/web-servers/lighttpd/cgit.nix b/nixos/modules/services/web-servers/lighttpd/cgit.nix index c8590e6a54e1..710fecc0c05c 100644 --- a/nixos/modules/services/web-servers/lighttpd/cgit.nix +++ b/nixos/modules/services/web-servers/lighttpd/cgit.nix @@ -63,6 +63,11 @@ in } ''; + systemd.services.lighttpd.preStart = '' + mkdir -p /var/cache/cgit + chown lighttpd:lighttpd /var/cache/cgit + ''; + }; } diff --git a/nixos/modules/services/web-servers/lighttpd/default.nix b/nixos/modules/services/web-servers/lighttpd/default.nix index 171503db4eec..84cd0a4095d9 100644 --- a/nixos/modules/services/web-servers/lighttpd/default.nix +++ b/nixos/modules/services/web-servers/lighttpd/default.nix @@ -224,12 +224,6 @@ in description = "Lighttpd Web Server"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - preStart = '' - ${if cfg.cgit.enable then '' - mkdir -p /var/cache/cgit - chown lighttpd:lighttpd /var/cache/cgit - '' else ""} - ''; serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f ${configFile}"; # SIGINT => graceful shutdown serviceConfig.KillSignal = "SIGINT"; -- cgit 1.4.1