home: wm: add screen-lock

This commit is contained in:
Bruno BELANYI 2021-04-06 17:20:39 +00:00
parent 54a20058fb
commit 9f6c614c9f
2 changed files with 35 additions and 1 deletions

15
home/wm/screen-lock.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, lib, ... }:
let
cfg = config.my.home.wm.screen-lock;
in
{
config = lib.mkIf cfg.enable {
services.screen-locker = {
enable = true;
inactiveInterval = cfg.timeout;
lockCmd = cfg.command;
};
};
}