From c10737da06a504ad731398f47eed13fcb59215f6 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 28 Jun 2026 15:47:18 +0100 Subject: [PATCH] Update files --- hardware/mounts.nix | 45 ++------------------- hardware/nas-mounts.nix | 31 ++++++++++++++ hardware/station-hardware-configuration.nix | 16 ++++---- hardware/station-mounts.nix | 22 ++++++++++ hardware/stationette-mounts.nix | 7 ++++ 5 files changed, 71 insertions(+), 50 deletions(-) create mode 100644 hardware/nas-mounts.nix create mode 100644 hardware/station-mounts.nix create mode 100644 hardware/stationette-mounts.nix diff --git a/hardware/mounts.nix b/hardware/mounts.nix index 7a5506b..0159c0f 100644 --- a/hardware/mounts.nix +++ b/hardware/mounts.nix @@ -1,47 +1,10 @@ -{ pkgs, ... }: +{ pkgs, hostname, ... }: { # Ensure NFS support is installed environment.systemPackages = [ pkgs.nfs-utils ]; - fileSystems = { - "/home/chris/Stardust" = { - device = "192.168.2.158:/mnt/tower/stardust/chris/files"; - fsType = "nfs4"; - options = [ - "defaults" - "x-systemd.mount-timeout=5" - "user" - "exec" - "x-systemd.automount" # Mounts on access - "noauto" # Doesn't block boot if server is down - ]; - }; - - "/home/chris/Foundry" = { - device = "192.168.2.158:/mnt/tower/foundry/Data"; - fsType = "nfs4"; - options = [ - "defaults" - "x-systemd.mount-timeout=5" - "user" - "exec" - "x-systemd.automount" - "noauto" - ]; - }; - - "/home/chris/Games" = { - device = "/dev/disk/by-label/Games"; - fsType = "ext4"; - options = [ - "defaults" - "x-systemd.mount-timeout=5" - "user" - "exec" - "x-systemd.automount" - "noauto" - ]; - }; - }; + imports = [ + ./${hostname}-mounts.nix + ]; } diff --git a/hardware/nas-mounts.nix b/hardware/nas-mounts.nix new file mode 100644 index 0000000..7470179 --- /dev/null +++ b/hardware/nas-mounts.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +{ + fileSystems = { + "/home/chris/Stardust" = { + device = "192.168.2.158:/mnt/tower/stardust/chris/files"; + fsType = "nfs4"; + options = [ + "defaults" + "x-systemd.mount-timeout=5" + "user" + "exec" + "x-systemd.automount" # Mounts on access + "noauto" # Doesn't block boot if server is down + ]; + }; + + "/home/chris/Foundry" = { + device = "192.168.2.158:/mnt/tower/foundry/Data"; + fsType = "nfs4"; + options = [ + "defaults" + "x-systemd.mount-timeout=5" + "user" + "exec" + "x-systemd.automount" + "noauto" + ]; + }; + }; +} diff --git a/hardware/station-hardware-configuration.nix b/hardware/station-hardware-configuration.nix index ca65dd6..5a4e17d 100644 --- a/hardware/station-hardware-configuration.nix +++ b/hardware/station-hardware-configuration.nix @@ -4,15 +4,13 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hardware/station-mounts.nix b/hardware/station-mounts.nix new file mode 100644 index 0000000..1f061de --- /dev/null +++ b/hardware/station-mounts.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +{ + imports = [ + ./nas-mounts.nix + ]; + + fileSystems = { + "/home/chris/Games" = { + device = "/dev/disk/by-label/Games"; + fsType = "ext4"; + options = [ + "defaults" + "x-systemd.mount-timeout=5" + "user" + "exec" + "x-systemd.automount" + "noauto" + ]; + }; + }; +} diff --git a/hardware/stationette-mounts.nix b/hardware/stationette-mounts.nix new file mode 100644 index 0000000..5181ea0 --- /dev/null +++ b/hardware/stationette-mounts.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + imports = [ + ./nas-mounts.nix + ]; +}