fix: suspend w betterlockscreen

This commit is contained in:
Noah Masur 2022-05-19 08:47:43 -04:00
parent d3cd9891f3
commit de023c2cd9

View File

@ -252,14 +252,17 @@ in {
}; };
# Ref: https://github.com/betterlockscreen/betterlockscreen/blob/next/system/betterlockscreen%40.service
systemd.services.lock = { systemd.services.lock = {
description = "Lock the screen on resume from suspend"; description = "Lock the screen on resume from suspend";
before = [ "sleep.target" "suspend.target" ]; before = [ "sleep.target" "suspend.target" ];
serviceConfig = { serviceConfig = {
User = config.user; User = config.user;
Type = "forking"; Type = "simple";
Environment = "DISPLAY=:0"; Environment = "DISPLAY=:0";
TimeoutSec = "infinity";
ExecStart = lockCmd; ExecStart = lockCmd;
ExecStartPost = "${pkgs.coreutils-full}/bin/sleep 1";
}; };
wantedBy = [ "sleep.target" "suspend.target" ]; wantedBy = [ "sleep.target" "suspend.target" ];
}; };