From ef703ecbcfc7ec3fc85ba60c15c9a1fd4f1c6302 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Tue, 28 Oct 2025 11:02:15 +0100 Subject: [PATCH] yggdrasil: move out hardware config --- modules/hosts/yggdrasil/default.nix | 69 --------------------------- modules/hosts/yggdrasil/hardware.nix | 71 ++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 69 deletions(-) create mode 100644 modules/hosts/yggdrasil/hardware.nix diff --git a/modules/hosts/yggdrasil/default.nix b/modules/hosts/yggdrasil/default.nix index 5d2b45d..0894d92 100644 --- a/modules/hosts/yggdrasil/default.nix +++ b/modules/hosts/yggdrasil/default.nix @@ -24,18 +24,7 @@ in diebahn path-of-building - bottles - - # to be removed - kdePackages.bluez-qt - zed-editor - seahorse - font-manager - vesktop - rofi-unwrapped ]; - # to be removed - virtualisation.waydroid.enable = true; services.teamviewer.enable = true; environment.pathsToLink = [ "/libexec" ]; @@ -111,63 +100,5 @@ in ]; }; - boot = { - kernelPackages = pkgs.linuxPackages_latest; - - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - initrd.availableKernelModules = [ - "nvme" - "ahci" - "xhci_pci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - kernelModules = [ "kvm-amd" ]; - - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/B4D4-8BA0"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - "/storage" = { - device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd"; - fsType = "ext4"; - }; - - "/var/lib/bluetooth" = { - device = "/persist/var/lib/bluetooth"; - options = [ - "bind" - "noauto" - "x-systemd.automount" - ]; - noCheck = true; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.enableRedistributableFirmware = true; - hardware.cpu.amd.updateMicrocode = true; }; } diff --git a/modules/hosts/yggdrasil/hardware.nix b/modules/hosts/yggdrasil/hardware.nix new file mode 100644 index 0000000..40864db --- /dev/null +++ b/modules/hosts/yggdrasil/hardware.nix @@ -0,0 +1,71 @@ +{ + config, + ... +}: +let +in +{ + flake.modules.nixos."hosts/yggdrasil" = + { lib, pkgs, ... }: + { + + boot = { + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + initrd.availableKernelModules = [ + "nvme" + "ahci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + kernelModules = [ "kvm-amd" ]; + + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/B4D4-8BA0"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + "/storage" = { + device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd"; + fsType = "ext4"; + }; + + "/var/lib/bluetooth" = { + device = "/persist/var/lib/bluetooth"; + options = [ + "bind" + "noauto" + "x-systemd.automount" + ]; + noCheck = true; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + }; +}