~ruther/nixos-config

5ba54fb4a918cc52b3ed1ee10219f7b3ed3c0cd2 — Frantisek Bohacek 11 months ago 091930c
feat: make sure xss-lock starts only with xorg wm sessions
2 files changed, 10 insertions(+), 19 deletions(-)

M nixos/hosts/laptop-iapetus/default.nix
M nixos/hosts/laptop-phobos/default.nix
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 = {

Do not follow this link