From 4a83363ee5e8615c5ef4f014ec8cae23b8bd3908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sat, 21 Feb 2026 23:37:14 +0100 Subject: [PATCH] hosts: add pn01 and pn02 (ASUS PN51 mini PCs) Add two ASUS PN51 hosts on VLAN 12 for stability testing. pn01 at 10.69.12.60, pn02 at 10.69.12.61, both test-tier compute role. Co-Authored-By: Claude Opus 4.6 --- flake.nix | 18 ++++++++++ hosts/pn01/configuration.nix | 51 +++++++++++++++++++++++++++ hosts/pn01/default.nix | 5 +++ hosts/pn01/hardware-configuration.nix | 33 +++++++++++++++++ hosts/pn02/configuration.nix | 51 +++++++++++++++++++++++++++ hosts/pn02/default.nix | 5 +++ hosts/pn02/hardware-configuration.nix | 33 +++++++++++++++++ 7 files changed, 196 insertions(+) create mode 100644 hosts/pn01/configuration.nix create mode 100644 hosts/pn01/default.nix create mode 100644 hosts/pn01/hardware-configuration.nix create mode 100644 hosts/pn02/configuration.nix create mode 100644 hosts/pn02/default.nix create mode 100644 hosts/pn02/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 9960431..d7b9cda 100644 --- a/flake.nix +++ b/flake.nix @@ -200,6 +200,24 @@ ./hosts/garage01 ]; }; + pn01 = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs self; + }; + modules = commonModules ++ [ + ./hosts/pn01 + ]; + }; + pn02 = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs self; + }; + modules = commonModules ++ [ + ./hosts/pn02 + ]; + }; }; packages = forAllSystems ( { pkgs }: diff --git a/hosts/pn01/configuration.nix b/hosts/pn01/configuration.nix new file mode 100644 index 0000000..3ab0371 --- /dev/null +++ b/hosts/pn01/configuration.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + ./hardware-configuration.nix + ../../system + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "pn01"; + networking.domain = "home.2rjus.net"; + networking.useNetworkd = true; + networking.useDHCP = false; + networking.firewall.enable = false; + services.resolved.enable = true; + networking.nameservers = [ + "10.69.13.5" + "10.69.13.6" + ]; + + systemd.network.enable = true; + systemd.network.networks."enp2s0" = { + matchConfig.Name = "enp2s0"; + address = [ + "10.69.12.60/24" + ]; + routes = [ + { Gateway = "10.69.12.1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; + + time.timeZone = "Europe/Oslo"; + + homelab.host = { + tier = "test"; + priority = "low"; + role = "compute"; + }; + + nixpkgs.config.allowUnfree = true; + + system.stateVersion = "25.11"; +} diff --git a/hosts/pn01/default.nix b/hosts/pn01/default.nix new file mode 100644 index 0000000..4cd684a --- /dev/null +++ b/hosts/pn01/default.nix @@ -0,0 +1,5 @@ +{ ... }: { + imports = [ + ./configuration.nix + ]; +} diff --git a/hosts/pn01/hardware-configuration.nix b/hosts/pn01/hardware-configuration.nix new file mode 100644 index 0000000..a9969f4 --- /dev/null +++ b/hosts/pn01/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9444cf54-80e0-4315-adca-8ddd5037217c"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/D897-146F"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/6c1e775f-342e-463a-a7f9-d7ce6593a482"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/pn02/configuration.nix b/hosts/pn02/configuration.nix new file mode 100644 index 0000000..3e0502e --- /dev/null +++ b/hosts/pn02/configuration.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + ./hardware-configuration.nix + ../../system + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "pn02"; + networking.domain = "home.2rjus.net"; + networking.useNetworkd = true; + networking.useDHCP = false; + networking.firewall.enable = false; + services.resolved.enable = true; + networking.nameservers = [ + "10.69.13.5" + "10.69.13.6" + ]; + + systemd.network.enable = true; + systemd.network.networks."enp2s0" = { + matchConfig.Name = "enp2s0"; + address = [ + "10.69.12.61/24" + ]; + routes = [ + { Gateway = "10.69.12.1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; + + time.timeZone = "Europe/Oslo"; + + homelab.host = { + tier = "test"; + priority = "low"; + role = "compute"; + }; + + nixpkgs.config.allowUnfree = true; + + system.stateVersion = "25.11"; +} diff --git a/hosts/pn02/default.nix b/hosts/pn02/default.nix new file mode 100644 index 0000000..4cd684a --- /dev/null +++ b/hosts/pn02/default.nix @@ -0,0 +1,5 @@ +{ ... }: { + imports = [ + ./configuration.nix + ]; +} diff --git a/hosts/pn02/hardware-configuration.nix b/hosts/pn02/hardware-configuration.nix new file mode 100644 index 0000000..9353a25 --- /dev/null +++ b/hosts/pn02/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1d28b629-51ae-4f0e-b440-9388c2e48413"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/A5A7-C7B2"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f2570894-0922-4746-84c7-2b2fe7601ea1"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}