diff options
Diffstat (limited to 'machines/helium.nix')
-rw-r--r-- | machines/helium.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/machines/helium.nix b/machines/helium.nix index 383cbe1..44c317d 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -63,15 +63,12 @@ in { # hardware.acpilight.enable = true; hardware.brillo.enable = true; hardware.opengl.enable = true; - hardware.pulseaudio = { - enable = true; - extraConfig = '' - load-module module-loopback - ''; - }; sound.enable = true; sound.mediaKeys.enable = true; + hardware.pulseaudio.enable = true; + hardware.pulseaudio.daemon.logLevel = "debug"; + # hardware.pulseaudio.extraConfig = "load-module module-loopback"; programs = { bash.enableCompletion = true; @@ -89,6 +86,7 @@ in { pcscd.enable = true; logind.lidSwitch = "suspend"; + logind.lidSwitchDocked = "lock"; logind.extraConfig = "IdleAction=lock"; clight.enable = true; @@ -111,6 +109,8 @@ in { xserver.xautolock.locker = "${pkgs.xlockmore}/bin/xlock"; xserver.xautolock.nowlocker = "${pkgs.xlockmore}/bin/xlock"; # xautolock -locknow xserver.xautolock.time = 5; # minutes + xserver.xautolock.killer = "${pkgs.systemd}/bin/systemctl suspend"; + xserver.xautolock.killtime = 120; # minutes xserver.xautolock.enableNotifier = true; xserver.xautolock.notify = 30; # seconds xserver.xautolock.notifier = ''${pkgs.libnotify}/bin/notify-send "Locking in 30 seconds"''; @@ -130,15 +130,17 @@ in { LABEL="yubico_end" # when yubi is removed, activate yubilock - ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", ENV{ID_SERIAL}="Yubico_Yubikey_4_OTP+U2F+CCID", RUN+="${pkgs.systemd}/bin/systemctl start yubilock" + #ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", ENV{ID_SERIAL}="Yubico_Yubikey_4_OTP+U2F+CCID", RUN+="${pkgs.systemd}/bin/systemctl start xlock" ''; }; systemd.services = { - "yubilock" = { - enable = false; + "xlock" = { + enable = true; script = "xlock"; path = [ pkgs.xlockmore ]; - wantedBy = ["dummy.device"]; # i have to provide a WantedBy + # nat sure about these targets + wantedBy = [ "sleep.target" "suspend.target" "hibernate.target" ]; + after = [ "sleep.target" "suspend.target" "hibernate.target" ]; environment = { DISPLAY = ":0"; }; # i think i can get rid of user if I use this script: # https://0day.work/locking-the-screen-when-removing-a-yubikey/ |