From 17b0487d56d38b4e0130ce19796deefd22f5800c Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Tue, 7 Apr 2026 10:16:23 -0700 Subject: [PATCH] fix: mask logind service and override config to stop input grab services.logind.enable doesn't exist in NixOS, so mask it via systemd and override logind.conf to HandlePowerKey=ignore and NAutoVTs=0. This prevents logind from EVIOCGRAB-ing keyboard and power button events that ac-native reads via evdev. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/nixos/configuration.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fedac/nixos/configuration.nix b/fedac/nixos/configuration.nix index e4e0520480..36ae1ca8c8 100644 --- a/fedac/nixos/configuration.nix +++ b/fedac/nixos/configuration.nix @@ -29,10 +29,19 @@ in services.openssh.enable = false; security.polkit.enable = true; - # Disable logind entirely — it grabs keyboard/power evdev events - # that ac-native needs to read directly. No session management needed + # Mask logind — it grabs keyboard/power evdev events that ac-native + # needs to read directly via EVIOCGRAB. No session management needed # on a single-purpose kiosk. - services.logind.enable = false; + systemd.services.systemd-logind.enable = false; + systemd.services.systemd-logind.wantedBy = lib.mkForce []; + environment.etc."systemd/logind.conf".text = lib.mkForce '' + [Login] + NAutoVTs=0 + HandlePowerKey=ignore + HandleSuspendKey=ignore + HandleHibernateKey=ignore + HandleLidSwitch=ignore + ''; # Networking (WiFi managed by ac-native, not NetworkManager) networking = { -- 2.51.2