1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/configs/xautolock.nix
Kierán Meinhardt a763c63de4 modularize
2019-04-19 03:11:51 +02:00

17 lines
608 B
Nix

{ config, pkgs, ... }:
{
services.xserver.displayManager.sessionCommands = ''
${pkgs.systemd}/bin/systemctl --user import-environment XDG_SESSION_PATH
${pkgs.lightlocker}/bin/light-locker &
'';
services.xserver.xautolock = {
enable = true;
killer = "${pkgs.systemd}/bin/systemctl suspend";
locker = "${pkgs.lightlocker}/bin/light-locker-command -l";
nowlocker = "${pkgs.lightlocker}/bin/light-locker-command -l";
enableNotifier = true;
notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."'';
};
}