diff options
| -rw-r--r-- | configuration.nix | 12 | ||||
| -rw-r--r-- | modules/lockscreen.nix | 28 | ||||
| -rw-r--r-- | packages.nix | 12 |
3 files changed, 33 insertions, 19 deletions
diff --git a/configuration.nix b/configuration.nix index b5e1eef..5598154 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,6 +17,7 @@ ./modules/jackett.nix ./modules/thunderbird/default.nix ./modules/clamav.nix + ./modules/lockscreen.nix ]; nixpkgs.config = { @@ -28,17 +29,14 @@ programs.dconf.enable = true; - # Fix hmr issue? + programs.nix-ld.enable = true; + + # Fix hmr issue systemd.extraConfig = ''DefaultLimitNOFILE=65536''; systemd.user.extraConfig = ''DefaultLimitNOFILE=65536''; boot.kernel.sysctl."fs.inotify.max_user_instances" = 8192; security.pam.loginLimits = [ - { - domain = "*"; - type = "-"; - item = "nofile"; - value = "65536"; - } + { domain = "*"; type = "-"; item = "nofile"; value = "65536"; } ]; # NOTE: Enable bluetooth using this and then use bluetoothctl diff --git a/modules/lockscreen.nix b/modules/lockscreen.nix new file mode 100644 index 0000000..34214fa --- /dev/null +++ b/modules/lockscreen.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: +let + localPkgs = import ../packages/default.nix { inherit pkgs; }; +in { + environment.systemPackages = [ localPkgs.bslock ]; + + services.xserver.xautolock = { + enable = true; + time = 15; # minutes + locker = "${localPkgs.bslock}/bin/bslock"; + + enableNotifier = true; + notify = 30; + notifier = "${pkgs.libnotify}/bin/notify-send 'Locking in 30 seconds'"; + killer = null; + }; + + # Security wrappers + security.wrappers = { + bslock = { + # owner = config.users.users.imsohexy.name; + owner = "root"; + setuid = true; + group = "root"; + source = "${localPkgs.bslock}/bin/bslock"; + }; + }; +} diff --git a/packages.nix b/packages.nix index 429045c..09ab398 100644 --- a/packages.nix +++ b/packages.nix @@ -11,7 +11,6 @@ let st dmenu anypinentry - bslock # sidekick ]; @@ -200,15 +199,4 @@ in programs._1password.enable = true; programs._1password-gui.enable = true; - - # Security wrappers - security.wrappers = { - bslock = { - # owner = config.users.users.imsohexy.name; - owner = "root"; - setuid = true; - group = "root"; - source = "${localPkgs.bslock}/bin/bslock"; - }; - }; } |
