Correction des permissions

merge-requests/18/head
korenstin 2025-06-28 09:54:55 +02:00
parent 1fe25c1b5f
commit abcf6977cc
2 changed files with 21 additions and 17 deletions

View File

@ -140,6 +140,7 @@ in {
boot.loader.grub.devices = [ "/dev/sda" ];
users.users."nginx".home = "/var/lib/nginx";
users.users."anubis".extraGroups = [ "nginx" ];
crans = {
enable = true;

View File

@ -95,7 +95,9 @@ in
};
config.services = mkIf cfg.enable {
anubis.instances = mapAttrs (
anubis = {
defaultOptions.group = "nginx";
instances = mapAttrs (
vhostName: vhostConfig: {
enable = true;
settings = {
@ -104,7 +106,7 @@ in
TARGET = "unix:///run/nginx/nginx-${vhostName}.sock";
COOKIE_DOMAIN = "crans.org";
REDIRECT_DOMAINS = "${vhostName}.crans.org";
SOCKET_MODE = "0666";
SOCKET_MODE = "0660";
POLICY_FNAME =
if (vhostConfig.anubisConfig == "")
then allowAll
@ -112,6 +114,7 @@ in
};
}
) cfg.virtualHosts;
};
nginx =
let