nixos/lighttpd: move cgit setup to cgit.nix

To where it really belongs. Separation of concern.
This commit is contained in:
Bjørn Forsman 2016-07-25 21:22:51 +02:00
parent d5c27859b4
commit 0a2174f195
2 changed files with 5 additions and 6 deletions

View File

@ -63,6 +63,11 @@ in
}
'';
systemd.services.lighttpd.preStart = ''
mkdir -p /var/cache/cgit
chown lighttpd:lighttpd /var/cache/cgit
'';
};
}

View File

@ -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";