]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/screen-locker.nix
profiles: revamp
[julm/julm-nix.git] / home-manager / profiles / screen-locker.nix
1 { pkgs, lib, ... }:
2 with lib;
3 {
4 home.packages = [
5 pkgs.xsecurelock
6 pkgs.xss-lock
7 ];
8 services.screen-locker = {
9 enable = true;
10 lockCmd = toString (pkgs.writeShellScript "xsecurelock" ''
11 export PATH=${with pkgs; makeBinPath [coreutils gnugrep xsecurelock xorg.xset]}
12 XSECURELOCK_BLANK_DPMS_STATE=off \
13 XSECURELOCK_BLANK_TIMEOUT=1 \
14 XSECURELOCK_DIM_TIME_MS=2000 \
15 XSECURELOCK_DISCARD_FIRST_KEYPRESS=0 \
16 XSECURELOCK_SAVER=saver_blank \
17 XSECURELOCK_SHOW_DATETIME=1 \
18 XSECURELOCK_SHOW_HOSTNAME=1 \
19 XSECURELOCK_SHOW_USERNAME=1 \
20 XSECURELOCK_WAIT_TIME_MS=2000 \
21 ${pkgs.xsecurelock}/bin/xsecurelock
22 '');
23 #XSECURELOCK_SWITCH_USER_COMMAND="${pkgs.lightdm}/bin/dm-tool switch-to-greeter" \
24 inactiveInterval = mkDefault 3; # minutes
25 xautolock.detectSleep = true;
26 xss-lock.extraOptions = [
27 "--transfer-sleep-lock"
28 #"-n" "${pkgs.xss-lock}/share/doc/xss-lock/dim-screen.sh"
29 ];
30 };
31 }