From 538b882f83bea4aad3753cc89579c0a377cdccfb Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 28 Nov 2026 03:16:30 +0000 Subject: zu: replace the x220's hardware by its own --- systems/zu/config.nix | 15 ++++++++++++++- systems/zu/hardware.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 systems/zu/hardware.nix (limited to 'systems/zu') diff --git a/systems/zu/config.nix b/systems/zu/config.nix index acd2c752..8a4371b2 100644 --- a/systems/zu/config.nix +++ b/systems/zu/config.nix @@ -2,7 +2,7 @@ krebs.build.host = config.krebs.hosts.zu; imports = [ - ../../configs/hw/x220.nix + ./hardware.nix ../../configs/btrfs-scrub.nix ../../configs/exim-retiolum.nix ../../configs/gitrepos.nix @@ -18,6 +18,9 @@ boot.initrd.luks.devices.zuca.device = "/dev/sda2"; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + fileSystems = { "/" = { device = "/dev/mapper/zuvga-root"; @@ -42,6 +45,16 @@ networking.wireless.enable = true; + nix.daemonCPUSchedPolicy = "batch"; + nix.daemonIOSchedPriority = 1; + + services.logind.settings.Login.HandleHibernateKey = "ignore"; + services.logind.settings.Login.HandleLidSwitch = "ignore"; + services.logind.settings.Login.HandleLidSwitchDocked = "ignore"; + services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore"; + services.logind.settings.Login.HandlePowerKey = "ignore"; + services.logind.settings.Login.HandleSuspendKey = "ignore"; + services.printing.enable = true; #services.bitlbee.enable = true; diff --git a/systems/zu/hardware.nix b/systems/zu/hardware.nix new file mode 100644 index 00000000..f4ca49c9 --- /dev/null +++ b/systems/zu/hardware.nix @@ -0,0 +1,27 @@ +{ + imports = [ + ../../configs/smartd.nix + ]; + + # MSI MAG X870 TOMAHAWK WIFI. Wake on LAN from S3 needs the BIOS settings + # Wake Up Event By = BIOS and ErP Ready = Enabled. + boot.initrd.availableKernelModules = [ + "ahci" + "sd_mod" + "thunderbolt" + "xhci_pci" + "xhci_pci_prom21" + ]; + + boot.initrd.kernelModules = [ + "dm-snapshot" + ]; + + boot.kernelModules = [ + "kvm-amd" + "nct6683" # for sensors + ]; + + hardware.cpu.amd.updateMicrocode = true; + hardware.enableRedistributableFirmware = true; +} -- cgit v1.3.1