From aa301f733857d22698cc3bd4b2bc17cb46439d64 Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Sat, 11 Apr 2026 11:37:58 +0200 Subject: [PATCH] Added Cyper Node 2 --- flake.nix | 7 +++ hosts/cyper-node-2/configuration.nix | 36 +++++++++++++ hosts/cyper-node-2/hardware-configuration.nix | 51 +++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 hosts/cyper-node-2/configuration.nix create mode 100644 hosts/cyper-node-2/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 1708b75..207d6a2 100644 --- a/flake.nix +++ b/flake.nix @@ -144,11 +144,18 @@ hostName = "cyper-desktop"; system = "x86_64-linux"; }; + "cyper-node-1" = mkSystem { hostName = "cyper-node-1"; system = "x86_64-linux"; isServer = true; }; + + "cyper-node-2" = mkSystem { + hostName = "cyper-node-2"; + system = "x86_64-linux"; + isServer = true; + }; }; darwinConfigurations."cyper-mac" = mkSystem { diff --git a/hosts/cyper-node-2/configuration.nix b/hosts/cyper-node-2/configuration.nix new file mode 100644 index 0000000..5fe45e5 --- /dev/null +++ b/hosts/cyper-node-2/configuration.nix @@ -0,0 +1,36 @@ +{ + imports = [ + ./hardware-configuration.nix + ../../nixos/roles/wyl.nix + ]; + + networking = { + useNetworkd = true; + useDHCP = false; + firewall.enable = true; + }; + + systemd.network = { + enable = true; + networks."10-ethernet" = { + matchConfig.Name = "enp1s0"; + networkConfig = { + Address = "192.168.2.31/24"; + Gateway = "192.168.2.1"; + DNS = "192.168.2.2"; + DHCP = "no"; + }; + }; + }; + + boot.loader = { + systemd-boot = { + enable = true; + configurationLimit = 10; + editor = false; + }; + efi.canTouchEfiVariables = true; + }; + + system.stateVersion = "26.05"; +} diff --git a/hosts/cyper-node-2/hardware-configuration.nix b/hosts/cyper-node-2/hardware-configuration.nix new file mode 100644 index 0000000..f6f9e88 --- /dev/null +++ b/hosts/cyper-node-2/hardware-configuration.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + fileSystems = { + "/" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + }; + + swapDevices = [ + { + device = "/swapfile"; + size = 4096; + } + ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}