nixos/lighttpd: move cgit setup to cgit.nix
To where it really belongs. Separation of concern.
This commit is contained in:
parent
d5c27859b4
commit
0a2174f195
@ -63,6 +63,11 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
systemd.services.lighttpd.preStart = ''
|
||||||
|
mkdir -p /var/cache/cgit
|
||||||
|
chown lighttpd:lighttpd /var/cache/cgit
|
||||||
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -224,12 +224,6 @@ in
|
|||||||
description = "Lighttpd Web Server";
|
description = "Lighttpd Web Server";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.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}";
|
serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f ${configFile}";
|
||||||
# SIGINT => graceful shutdown
|
# SIGINT => graceful shutdown
|
||||||
serviceConfig.KillSignal = "SIGINT";
|
serviceConfig.KillSignal = "SIGINT";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user