sp-modules: x-systemd.before=... for all mountpoints

This commit is contained in:
Alexander Tomokhov 2023-12-22 18:07:14 +04:00
parent 5f8cc727e0
commit 19f30daf80
4 changed files with 23 additions and 3 deletions

View file

@ -25,6 +25,9 @@ in
"x-systemd.required-by=bitwarden-secrets.service" "x-systemd.required-by=bitwarden-secrets.service"
"x-systemd.required-by=backup-vaultwarden.service" "x-systemd.required-by=backup-vaultwarden.service"
"x-systemd.required-by=vaultwarden.service" "x-systemd.required-by=vaultwarden.service"
"x-systemd.before=bitwarden-secrets.service"
"x-systemd.before=backup-vaultwarden.service"
"x-systemd.before=vaultwarden.service"
]; ];
}; };
"/var/lib/bitwarden_rs" = { "/var/lib/bitwarden_rs" = {
@ -34,6 +37,9 @@ in
"x-systemd.required-by=bitwarden-secrets.service" "x-systemd.required-by=bitwarden-secrets.service"
"x-systemd.required-by=backup-vaultwarden.service" "x-systemd.required-by=backup-vaultwarden.service"
"x-systemd.required-by=vaultwarden.service" "x-systemd.required-by=vaultwarden.service"
"x-systemd.before=bitwarden-secrets.service"
"x-systemd.before=backup-vaultwarden.service"
"x-systemd.before=vaultwarden.service"
]; ];
}; };
}; };

View file

@ -24,6 +24,8 @@
"bind" "bind"
"x-systemd.required-by=nextcloud-setup.service" "x-systemd.required-by=nextcloud-setup.service"
"x-systemd.required-by=nextcloud-secrets.service" "x-systemd.required-by=nextcloud-secrets.service"
"x-systemd.before=nextcloud-setup.service"
"x-systemd.before=nextcloud-secrets.service"
]; ];
}; };
}; };

View file

@ -22,6 +22,8 @@ in
"bind" "bind"
"x-systemd.required-by=pleroma-secrets.service" "x-systemd.required-by=pleroma-secrets.service"
"x-systemd.required-by=pleroma.service" "x-systemd.required-by=pleroma.service"
"x-systemd.before=pleroma.service"
"x-systemd.before=pleroma-secrets.service"
]; ];
}; };
"/var/lib/postgresql" = { "/var/lib/postgresql" = {
@ -30,6 +32,8 @@ in
"bind" "bind"
"x-systemd.required-by=pleroma-secrets.service" "x-systemd.required-by=pleroma-secrets.service"
"x-systemd.required-by=pleroma.service" "x-systemd.required-by=pleroma.service"
"x-systemd.before=pleroma-secrets.service"
"x-systemd.before=pleroma.service"
]; ];
}; };
}; };
@ -78,7 +82,7 @@ in
install -C -m 0700 -o pleroma -g pleroma -d /var/lib/pleroma install -C -m 0700 -o pleroma -g pleroma -d /var/lib/pleroma
install -C -m 0700 -o pleroma -g pleroma -DT \ install -C -m 0600 -o pleroma -g pleroma -DT \
<(printf "%s" "$filecontents") ${secrets-exs} <(printf "%s" "$filecontents") ${secrets-exs}
''; '';
}; };

View file

@ -9,12 +9,20 @@ lib.mkIf sp.modules.simple-nixos-mailserver.enable
"/var/vmail" = { "/var/vmail" = {
device = device =
"/volumes/${sp.modules.simple-nixos-mailserver.location}/vmail"; "/volumes/${sp.modules.simple-nixos-mailserver.location}/vmail";
options = [ "bind" ]; options = [
"bind"
"x-systemd.required-by=postfix.service"
"x-systemd.before=postfix.service"
];
}; };
"/var/sieve" = { "/var/sieve" = {
device = device =
"/volumes/${sp.modules.simple-nixos-mailserver.location}/sieve"; "/volumes/${sp.modules.simple-nixos-mailserver.location}/sieve";
options = [ "bind" ]; options = [
"bind"
"x-systemd.required-by=dovecot2.service"
"x-systemd.before=dovecot2.service"
];
}; };
}; };