diff --git a/features/desktopish/autolock.nix b/features/desktopish/autolock.nix new file mode 100644 index 0000000..1a85966 --- /dev/null +++ b/features/desktopish/autolock.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + services.xserver.xautolock = { + enable = true; + time = 5; # mins + + # Not sure if some modes are the cause of system freeze + # So deterministically pick one. + locker = "${pkgs.xlockmore}/bin/xlock -mode space"; + + # Suspend after sometime (enable this after things are okay) + killtime = 20; # mins + killer = "${pkgs.systemd}/bin/systemctl suspend"; + }; +} diff --git a/features/desktopish/default.nix b/features/desktopish/default.nix index b1d411c..ba61261 100644 --- a/features/desktopish/default.nix +++ b/features/desktopish/default.nix @@ -7,6 +7,7 @@ ./screencapture.nix ./fonts.nix ./touchpad-trackpoint.nix + ./autolock.nix # WMish things ./xmonad