screen-locker: set Restart=always for all services (#6534)

This commit is contained in:
Even Brenden 2025-02-26 22:41:55 +01:00 committed by GitHub
parent 44b86a72e7
commit 6be185eb76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -127,6 +127,7 @@ in {
ExecStart = concatStringsSep " "
([ "${cfg.xss-lock.package}/bin/xss-lock" "-s \${XDG_SESSION_ID}" ]
++ cfg.xss-lock.extraOptions ++ [ "-- ${cfg.lockCmd}" ]);
Restart = "always";
};
};
}
@ -153,6 +154,7 @@ in {
"-locker '${pkgs.systemd}/bin/loginctl lock-session \${XDG_SESSION_ID}'"
] ++ optional cfg.xautolock.detectSleep "-detectsleep"
++ cfg.xautolock.extraOptions);
Restart = "always";
};
};
})

View file

@ -19,7 +19,9 @@
assertFileExists $xssService
assertFileRegex $xssService 'ExecStart=.*/bin/xss-lock.*-test.*i3lock -n -c AA0000'
assertFileRegex $xssService 'Restart=always'
assertFileExists $xautolockService
assertFileRegex $xautolockService 'ExecStart=.*/bin/xautolock.*-time 5.*-detectsleep.*-test.*'
assertFileRegex $xautolockService 'Restart=always'
'';
}