home: wm: screen-lock: use actual assertion
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Instead of hijacking the type verification, use an assertion.
This commit is contained in:
parent
8f266245ee
commit
cff3811cad
2 changed files with 17 additions and 7 deletions
|
|
@ -65,13 +65,7 @@ in
|
|||
enable = my.mkDisableOption "Notify when about to lock the screen";
|
||||
|
||||
delay = mkOption {
|
||||
type = with types;
|
||||
addCheck int (x:
|
||||
let
|
||||
cfg = config.my.home.wm.screen-lock.notify;
|
||||
cornerCfg = config.my.home.wm.screen-lock.cornerLock;
|
||||
in
|
||||
(cfg.enable && cornerCfg.enable) -> cornerCfg.delay >= x);
|
||||
type = types.int;
|
||||
default = 5;
|
||||
example = 15;
|
||||
description = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue