From 9e7729def580d83bc439985616f8c5d7162bcd48 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 7 Apr 2019 19:31:44 +0200 Subject: l screenlock: fix screen sometimes not locking --- lass/3modules/screenlock.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lass') 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}"; }; -- cgit v1.2.3