nixos/duosec: ensure correct ordering w.r.t. shutdown.target

This commit is contained in:
Philip Taron 2023-11-30 15:02:51 -08:00
parent 407ef67228
commit d7ab46ed87
No known key found for this signature in database

View file

@ -195,7 +195,8 @@ in
systemd.services.login-duo = lib.mkIf cfg.ssh.enable {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
before = [ "sysinit.target" "shutdown.target" ];
conflicts = [ "shutdown.target" ];
unitConfig.DefaultDependencies = false;
script = ''
if test -f "${cfg.secretKeyFile}"; then
@ -216,7 +217,8 @@ in
systemd.services.pam-duo = lib.mkIf cfg.ssh.enable {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
before = [ "sysinit.target" "shutdown.target" ];
conflicts = [ "shutdown.target" ];
unitConfig.DefaultDependencies = false;
script = ''
if test -f "${cfg.secretKeyFile}"; then