Files
nixos/machines/mibook/configuration.nix
finn.markwitz 4851f745d8 feat(mibook): do nothing on lid close while on AC power
Ship a system-wide PowerDevil default (/etc/xdg/powerdevilrc) setting the
AC lid-close action to "do nothing" (LidAction=0). Battery behavior is left
at the default (suspend).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbZoyXq6J8v2eqC9yn5Vcy
2026-07-21 17:42:47 +02:00

60 lines
1.1 KiB
Nix

{
config,
pkgs,
lib,
...
}:
{
imports = [
./disks.nix
./hardware-configuration.nix
./environments.nix
# ./system.nix use docker here
];
networking.hostName = "mibook";
boot.loader.grub = {
enable = true;
device = "/dev/nvme0n1";
useOSProber = true;
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "de";
variant = "";
};
# Configure console keymap
console.keyMap = "de";
# Enable CUPS to print documents.
services.printing.enable = true;
nixpkgs.config.allowUnfree = true;
hardware.nvidia.prime = {
sync.enable = false;
nvidiaBusId = "PCI:01:00:0";
intelBusId = "PCI:00:2:0";
};
services.openssh.enable = true;
# KDE (PowerDevil) power settings: do nothing on lid close while on AC power.
# Shipped as a system-wide default; KConfig cascades so a user's own
# ~/.config/powerdevilrc will override this if present.
environment.etc."xdg/powerdevilrc".text = ''
[AC][SuspendAndShutdown]
LidAction=0
'';
system = {
stateVersion = "23.05";
autoUpgrade.enable = true;
};
}