diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 58855f4..fa0646d 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -77,20 +77,6 @@ in description = "Locker command to run"; }; - cornerLock = { - enable = my.mkDisableOption '' - Move mouse to upper-left corner to lock instantly, lower-right corner to - disable auto-lock. - ''; - - delay = mkOption { - type = types.int; - default = 5; - example = 15; - description = "How many seconds before locking this way"; - }; - }; - notify = { enable = my.mkDisableOption "Notify when about to lock the screen"; @@ -100,14 +86,12 @@ in example = 15; description = '' How many seconds in advance should there be a notification. - This value must be at lesser than or equal to `cornerLock.delay` - when both options are enabled. ''; }; }; timeout = mkOption { - type = types.ints.between 1 60; + type = types.int; default = 15; example = 1; description = "Inactive time interval to lock the screen automatically"; diff --git a/modules/home/wm/screen-lock/default.nix b/modules/home/wm/screen-lock/default.nix index 5e6874e..ac6851c 100644 --- a/modules/home/wm/screen-lock/default.nix +++ b/modules/home/wm/screen-lock/default.nix @@ -12,22 +12,6 @@ let in { config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = - let - inherit (cfg) cornerLock notify; - bothEnabled = cornerLock.enable && notify.enable; - cornerLockHigherThanNotify = cornerLock.delay >= notify.delay; - in - bothEnabled -> cornerLockHigherThanNotify; - message = '' - `config.my.home.wm.notify.delay` cannot have a value higher than - `config.my.home.wm.cornerLock.delay`. - ''; - } - ]; - services.screen-locker = { enable = true; @@ -36,15 +20,7 @@ in lockCmd = cfg.command; xautolock = { - extraOptions = lib.optionals cfg.cornerLock.enable [ - # Mouse corners: instant lock on upper-left, never lock on lower-right - "-cornerdelay" - "${toString cfg.cornerLock.delay}" - "-cornerredelay" - "${toString cfg.cornerLock.delay}" - "-corners" - "+00-" - ] ++ lib.optionals cfg.notify.enable [ + extraOptions = lib.optionals cfg.notify.enable [ "-notify" "${toString cfg.notify.delay}" "-notifier"