mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-08 01:07:23 +08:00
autolock
This commit is contained in:
parent
4c17799aeb
commit
cc0413466d
2 changed files with 17 additions and 0 deletions
16
features/desktopish/autolock.nix
Normal file
16
features/desktopish/autolock.nix
Normal file
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
./screencapture.nix
|
||||
./fonts.nix
|
||||
./touchpad-trackpoint.nix
|
||||
./autolock.nix
|
||||
|
||||
# WMish things
|
||||
./xmonad
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue