aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-01-09 21:57:06 +0530
committerAkshay Nair <phenax5@gmail.com>2025-01-10 13:47:48 +0530
commit45d103f623752f9965e9de7a4fa60b3be3db026b (patch)
treea8ffa18fce8f4ca48f2f74a7a412530900a589b6 /modules
parent27138ae14a46729714499e2e605e0313c8c2c8be (diff)
downloadnixos-config-45d103f623752f9965e9de7a4fa60b3be3db026b.tar.gz
nixos-config-45d103f623752f9965e9de7a4fa60b3be3db026b.zip
Move bslock package into module and use xautolock instead of script
Diffstat (limited to 'modules')
-rw-r--r--modules/lockscreen.nix28
1 files changed, 28 insertions, 0 deletions
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";
+ };
+ };
+}