summaryrefslogtreecommitdiffstats
path: root/lass/3modules
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-04-07 19:31:44 +0200
committerlassulus <lassulus@lassul.us>2019-04-07 19:36:05 +0200
commit9e7729def580d83bc439985616f8c5d7162bcd48 (patch)
treecb66e53d74e05ee3dd8e958a0742b8c3b8042b44 /lass/3modules
parent23f5563134439fdb59593f2eda46add002284ca0 (diff)
l screenlock: fix screen sometimes not locking
Diffstat (limited to 'lass/3modules')
-rw-r--r--lass/3modules/screenlock.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/lass/3modules/screenlock.nix b/lass/3modules/screenlock.nix
index 29c3861f2..b5c69b65a 100644
--- a/lass/3modules/screenlock.nix
+++ b/lass/3modules/screenlock.nix
@@ -13,15 +13,18 @@ let
api = {
enable = mkEnableOption "screenlock";
command = mkOption {
- type = types.str;
- default = "${pkgs.xlockmore}/bin/xlock -mode life1d -size 1";
+ type = types.path;
+ default = pkgs.writeDash "screenlock" ''
+ ${pkgs.xlockmore}/bin/xlock -mode life1d -size 1
+ sleep 3
+ '';
};
};
imp = {
systemd.services.screenlock = {
before = [ "sleep.target" ];
- wantedBy = [ "sleep.target" ];
+ requiredBy = [ "sleep.target" ];
environment = {
DISPLAY = ":${toString config.services.xserver.display}";
};