summaryrefslogtreecommitdiff
path: root/home.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home.nix')
-rwxr-xr-xhome.nix51
1 files changed, 50 insertions, 1 deletions
diff --git a/home.nix b/home.nix
index 39054f1..fc6848d 100755
--- a/home.nix
+++ b/home.nix
@@ -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;