diff options
Diffstat (limited to 'home.nix')
| -rwxr-xr-x | home.nix | 51 |
1 files changed, 50 insertions, 1 deletions
@@ -16,7 +16,6 @@ let qutebrowser = "qutebrowser"; dunst = "dunst"; waybar = "waybar"; - hypr = "hypr"; rmpc = "rmpc"; fastfetch = "fastfetch"; mutt = "mutt"; @@ -28,6 +27,56 @@ let }; in { + programs.swaylock = { + enable = true; + settings = { + font-size = 24; + indicator-idle-visible = false; + show-failed-attempts = true; + }; + }; + services.swayidle = + let + # Lock command + lock = "${pkgs.swaylock}/bin/swaylock --daemonize"; + suspend = "systemctl suspend"; + in + { + enable = true; + timeouts = [ + { + timeout = 290; # in seconds + command = "${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds' -t 10000"; + } + { + timeout = 300; + command = lock; + } + { + timeout = 800; + command = "${pkgs.systemd}/bin/systemctl suspend"; + } + ]; + events = [ + # { + # event = "before-sleep"; + # # adding duplicated entries for the same event may not work + # command = (display "off") + "; " + lock; + # } + # { + # event = "after-resume"; + # command = display "on"; + # } + # { + # event = "lock"; + # command = (display "off") + "; " + lock; + # } + # { + # event = "unlock"; + # command = display "on"; + # } + ]; + }; programs.bash = { enable = true; enableCompletion = true; |
