From 72b0f6f8fad97a4ade1b54dfada26828a170febf Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 28 Jul 2025 14:33:04 +0200 Subject: [PATCH] split manwe config (WARNING split is done opposite to main branch) --- modules/nixos/boot/default.nix | 2 ++ systems/x86_64-linux/mandos/README.md | 3 +++ systems/x86_64-linux/mandos/default.nix | 26 +++++++++++++++++++ systems/x86_64-linux/mandos/disks.nix | 33 ++++++++++++++++++++++++ systems/x86_64-linux/mandos/hardware.nix | 18 +++++++++++++ systems/x86_64-linux/manwe/disks.nix | 17 ++++-------- systems/x86_64-linux/manwe/hardware.nix | 4 +-- 7 files changed, 89 insertions(+), 14 deletions(-) create mode 100644 systems/x86_64-linux/mandos/README.md create mode 100644 systems/x86_64-linux/mandos/default.nix create mode 100644 systems/x86_64-linux/mandos/disks.nix create mode 100644 systems/x86_64-linux/mandos/hardware.nix diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index 6ff6ac7..45f3170 100644 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -38,6 +38,8 @@ in footer = true; }; }; + + supportedFilesystems = [ "nfs" ] }; }) diff --git a/systems/x86_64-linux/mandos/README.md b/systems/x86_64-linux/mandos/README.md new file mode 100644 index 0000000..b7e2801 --- /dev/null +++ b/systems/x86_64-linux/mandos/README.md @@ -0,0 +1,3 @@ +# Description + +Living room Steambox. \ No newline at end of file diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix new file mode 100644 index 0000000..3186239 --- /dev/null +++ b/systems/x86_64-linux/mandos/default.nix @@ -0,0 +1,26 @@ +{ ... }: +let +in +{ + imports = [ + ./disks.nix + ./hardware.nix + ]; + + sneeuwvlok = { + hardware.has = { + gpu.nvidia = true; + bluetooth = true; + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "gamescope"; + }; + + system.stateVersion = "23.11"; +} \ No newline at end of file diff --git a/systems/x86_64-linux/mandos/disks.nix b/systems/x86_64-linux/mandos/disks.nix new file mode 100644 index 0000000..b143047 --- /dev/null +++ b/systems/x86_64-linux/mandos/disks.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + # TODO :: Implement disko at some point + swapDevices = [ { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/C842-316A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/home/chris/games" = { + device = "/dev/disk/by-label/games"; + fsType = "ext4"; + }; + + # TODO :: Reformat the disk to ext4 + "/home/chris/data" = { + device = "/dev/disk/by-label/Data"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=chris" ]; + }; + }; +} diff --git a/systems/x86_64-linux/mandos/hardware.nix b/systems/x86_64-linux/mandos/hardware.nix new file mode 100644 index 0000000..60759bd --- /dev/null +++ b/systems/x86_64-linux/mandos/hardware.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, modulesPath, system, ... }: +let + inherit (lib.modules) mkDefault; +in +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = []; + extraModulePackages = [ ]; + }; + + nixpkgs.hostPlatform = mkDefault system; + hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix index 3a3375e..f13f845 100644 --- a/systems/x86_64-linux/manwe/disks.nix +++ b/systems/x86_64-linux/manwe/disks.nix @@ -22,21 +22,14 @@ in options = [ "fmask=0022" "dmask=0022" ]; }; - "/home/chris/games" = { - device = "/dev/disk/by-label/games"; - fsType = "ext4"; - }; - - # TODO :: Reformat the disk to ext4 - "/home/chris/data" = { - device = "/dev/disk/by-label/Data"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=chris" ]; - }; - "/home/chris/media" = { device = "ulmo:/"; fsType = "nfs"; }; + + "/home/chris/mandos" = { + device = "mandos:/"; + fsType = "nfs"; + }; }; } diff --git a/systems/x86_64-linux/manwe/hardware.nix b/systems/x86_64-linux/manwe/hardware.nix index 60759bd..33ae3b5 100644 --- a/systems/x86_64-linux/manwe/hardware.nix +++ b/systems/x86_64-linux/manwe/hardware.nix @@ -8,11 +8,11 @@ in boot = { initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = [ "kvm-amd" ]; kernelParams = []; extraModulePackages = [ ]; }; nixpkgs.hostPlatform = mkDefault system; - hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; }