From f1855c1265a0fd3eb367aa82ef36169ac5c765d3 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 14 Sep 2025 14:12:14 +0200 Subject: [PATCH] remove dektop-hardware module --- flake.nix | 3 ++- modules/desktop-hardware.nix | 20 ------------------- nixosConfigurations/ronja-pc/default.nix | 1 - nixosConfigurations/ronja-pc/hardware.nix | 8 +++++++- nixosConfigurations/vinzenz-lpt2/default.nix | 1 - nixosConfigurations/vinzenz-lpt2/hardware.nix | 16 +++++++-------- nixosConfigurations/vinzenz-pc2/default.nix | 1 - nixosConfigurations/vinzenz-pc2/hardware.nix | 16 ++++++++++++--- nixosModules/firmware-updates.nix | 11 ++++++++++ 9 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 modules/desktop-hardware.nix create mode 100644 nixosModules/firmware-updates.nix diff --git a/flake.nix b/flake.nix index bb522a6..e526978 100644 --- a/flake.nix +++ b/flake.nix @@ -149,6 +149,7 @@ self.nixosModules.tailscale self.nixosModules.allowed-unfree-list self.nixosModules.extra-caches + self.nixosModules.systemd-boot zerforschen-plus.nixosModules.default ] @@ -181,7 +182,7 @@ self.nixosModules.modern-desktop self.nixosModules.nix-ld self.nixosModules.quiet-boot - self.nixosModules.systemd-boot + self.nixosModules.firmware-updates home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default diff --git a/modules/desktop-hardware.nix b/modules/desktop-hardware.nix deleted file mode 100644 index 97c13fc..0000000 --- a/modules/desktop-hardware.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, ... }: -{ - networking.networkmanager.enable = true; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - hardware = { - enableRedistributableFirmware = true; - bluetooth.enable = true; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - services.fwupd.enable = true; -} diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index e0e9117..6b7fa0b 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -8,7 +8,6 @@ ../../modules/gaming.nix vinzenzNixosModules.steam ../../modules/desktop-environment.nix - ../../modules/desktop-hardware.nix ../../home/ronja ]; diff --git a/nixosConfigurations/ronja-pc/hardware.nix b/nixosConfigurations/ronja-pc/hardware.nix index 56e653c..e6ad854 100644 --- a/nixosConfigurations/ronja-pc/hardware.nix +++ b/nixosConfigurations/ronja-pc/hardware.nix @@ -1,3 +1,4 @@ +{ lib, ... }: { boot = { supportedFilesystems = [ "btrfs" ]; @@ -38,5 +39,10 @@ { device = "/dev/disk/by-uuid/bf9d19fb-499b-4bfb-b67d-131fa5bf8259"; } ]; - hardware.cpu.intel.updateMicrocode = true; + hardware.bluetooth.enable = true; + + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; } diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index d29ae65..02f6d82 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -10,7 +10,6 @@ vinzenzNixosModules.printing vinzenzNixosModules.podman ../../modules/desktop-environment.nix - ../../modules/desktop-hardware.nix ../../home/vinzenz ../../home/ronja diff --git a/nixosConfigurations/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix index 4effcf9..cf5157c 100644 --- a/nixosConfigurations/vinzenz-lpt2/hardware.nix +++ b/nixosConfigurations/vinzenz-lpt2/hardware.nix @@ -1,7 +1,7 @@ { - lib, vinzenzNixosModules, pkgs, + lib, ... }: { @@ -12,15 +12,11 @@ "kvm-intel" "xe" ]; - hardware.cpu.intel.updateMicrocode = true; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - - hardware.enableRedistributableFirmware = true; + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; boot = { kernelPackages = pkgs.linuxPackages_zen; @@ -62,5 +58,7 @@ services.thermald.enable = true; services.hardware.bolt.enable = true; # thunderbolt security + + hardware.bluetooth.enable = true; }; } diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 4ba3632..0b5073d 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -13,7 +13,6 @@ vinzenzNixosModules.podman #../../modules/niri.nix ../../modules/desktop-environment.nix - ../../modules/desktop-hardware.nix ../../home/vinzenz ../../home/ronja diff --git a/nixosConfigurations/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix index 5a8751f..6a4c71a 100644 --- a/nixosConfigurations/vinzenz-pc2/hardware.nix +++ b/nixosConfigurations/vinzenz-pc2/hardware.nix @@ -1,10 +1,14 @@ -{ vinzenzNixosModules, pkgs, ... }: +{ + vinzenzNixosModules, + pkgs, + lib, + ... +}: { imports = [ vinzenzNixosModules.amd-graphics ]; config = { # amd cpu boot.kernelModules = [ "kvm-amd" ]; - hardware.cpu.amd.updateMicrocode = true; boot = { initrd.availableKernelModules = [ @@ -23,6 +27,12 @@ fileSystems = import ./fstab.nix; swapDevices = [ ]; - networking.interfaces.eno1.wakeOnLan.enable = true; + networking = { + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + interfaces.eno1.wakeOnLan.enable = true; + }; + + hardware.bluetooth.enable = true; }; } diff --git a/nixosModules/firmware-updates.nix b/nixosModules/firmware-updates.nix new file mode 100644 index 0000000..8e81b72 --- /dev/null +++ b/nixosModules/firmware-updates.nix @@ -0,0 +1,11 @@ +{ + hardware = { + enableRedistributableFirmware = true; + cpu = { + amd.updateMicrocode = true; + intel.updateMicrocode = true; + }; + }; + + services.fwupd.enable = true; +}