M nixos/hosts/laptop-iapetus/default.nix => nixos/hosts/laptop-iapetus/default.nix +6 -19
@@ 1,22 1,4 @@
-#
-# Specific system configuration settings for desktop
-#
-# flake.nix
-# ├─ ./hosts
-# │ └─ ./laptop
-# │ ├─ default.nix *
-# │ └─ hardware-configuration.nix
-# └─ ./modules
-# ├─ ./desktop
-# │ ├─ ./bspwm
-# │ │ └─ default.nix
-# │ └─ ./virtualisation
-# │ └─ docker.nix
-# └─ ./hardware
-# └─ default.nix
-#
-
-{ pkgs, ... }:
+{ lib, pkgs, ... }:
{
imports = [
@@ 76,6 58,11 @@
};
};
+ systemd.user.services.xss-lock = {
+ partOf = lib.mkForce [ "xorg-wm-session.target" ];
+ wantedBy = lib.mkForce [ "xorg-wm-session.target" ];
+ };
+
services = {
tlp.enable = true; # TLP and auto-cpufreq for power management
logind.lidSwitch = "lock"; # lock on lid close
M nixos/hosts/laptop-phobos/default.nix => nixos/hosts/laptop-phobos/default.nix +4 -0
@@ 92,6 92,10 @@
};
};
+ systemd.user.services.xss-lock = {
+ partOf = lib.mkForce [ "xorg-wm-session.target" ];
+ wantedBy = lib.mkForce [ "xorg-wm-session.target" ];
+ };
services = {
logind.lidSwitch = "suspend"; # suspend on lid close
libinput = {