mirror of https://gitlab.crans.org/nounous/nixos
fix: create log folders
parent
3575c130ae
commit
11b39e46a1
|
|
@ -147,6 +147,21 @@ in
|
|||
group = config.services.nginx.group;
|
||||
};
|
||||
|
||||
# Création des dossiers de logs
|
||||
system.activationScripts = {
|
||||
nginx-logs = {
|
||||
text =
|
||||
lib.concatMapStrings (f: "mkdir -p /var/log/nginx/${f}/\n") (
|
||||
[
|
||||
"anubis"
|
||||
"aliases"
|
||||
]
|
||||
++ (lib.map (hn: "host/${hn}") (builtins.attrNames cfg.virtualHosts))
|
||||
)
|
||||
+ "chown -R ${config.services.nginx.user}:${config.services.nginx.group} /var/log/nginx/\n";
|
||||
};
|
||||
};
|
||||
|
||||
services = mkIf cfg.enable {
|
||||
anubis = {
|
||||
defaultOptions.group = "nginx";
|
||||
|
|
|
|||
Loading…
Reference in New Issue