Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit7c4b97e694c774b3a8aac18a5759123d2ea3c1ce (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-09-24 17:16:06 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-09-24 17:16:06 +0300
Files9bf91e748c050d224870b3be1d613c42d6252255
nix-7c4b97e694c774b3a8aac18a5759123d2ea3c1ce.tar
nix-7c4b97e694c774b3a8aac18a5759123d2ea3c1ce.tar.gz
nix-7c4b97e694c774b3a8aac18a5759123d2ea3c1ce.zip
Parent3d5506d4960c3ba4e5705875c1b285ecdbcc6306 (diff)
[services] Fully implemented lock screen
Locking before suspend
2 files changed, 15 insertions, 2 deletions
-rw-r--r--packages.nix2
-rw-r--r--services.nix15
diff --git a/packages.nix b/packages.nix
index 9f62bb2..fd5bdcf 100644
--- a/packages.nix
+++ b/packages.nix
@@ -50,7 +50,7 @@ in {
# window manager, compositor, taskbar, notifications, app menu, lockscreen, session manager
openbox lxappearance obconf picom tint2 dunst jgmenu i3lock-color lightdm lightdm-gtk-greeter
# General X11 tools
- lxqt.lxqt-policykit xorg.xev xfontsel xorg.xmodmap xorg.xwininfo xorg.xprop clipnotify xdotool xss-lock xcape xorg.setxkbmap xkbmon xorg.xhost xclip
+ lxqt.lxqt-policykit xorg.xev xfontsel xorg.xmodmap xorg.xwininfo xorg.xprop clipnotify xdotool xautolock xcape xorg.setxkbmap xkbmon xorg.xhost xclip
devilspie2 sxhkd
];
laptop = [
diff --git a/services.nix b/services.nix
index e7f89cf..f185411 100644
--- a/services.nix
+++ b/services.nix
@@ -17,6 +17,19 @@
TimeoutStopSec = 10;
};
};
+
+ };
+
+ systemd.services = {
+ lockscreen = {
+ wantedBy = [ "sleep.target" ];
+ before = [ "suspend.target" ];
+ serviceConfig = {
+ User = "kamen";
+ Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" "DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/1000/bus\"" ];
+ ExecStart = "/home/kamen/.a/sys/lock.sh";
+ };
+ };
};
services = {
@@ -73,7 +86,7 @@
enable = true;
time = 15;
locker = "/home/kamen/.a/sys/lock.sh";
- extraOptions = [ "-detectsleep" "-lockaftersleep" "-secure" ];
+ extraOptions = [ "-detectsleep" "-secure" ];
};
};
};