From f5679d39f96c224ae0a2b2117522aceb4e4caebb Mon Sep 17 00:00:00 2001 From: Jonas Juselius Date: Tue, 16 Sep 2025 13:43:00 +0200 Subject: [PATCH] fix: add missing nodes and disable net mounts for now --- rossby/c0/default.nix | 24 +++++++---- rossby/c0/hardware-configuration.d/c0-1.nix | 43 ++++++++++++++++++++ rossby/c0/hardware-configuration.d/c0-12.nix | 42 +++++++++++++++++++ rossby/c0/hardware-configuration.d/c0-7.nix | 43 ++++++++++++++++++++ rossby/c0/nodes.nix | 3 +- rossby/c0/ssh_host_key.d/c0-1.pub | 7 ++++ rossby/c0/ssh_host_key.d/c0-12.pub | 7 ++++ rossby/c0/ssh_host_key.d/c0-7.pub | 7 ++++ 8 files changed, 166 insertions(+), 10 deletions(-) create mode 100644 rossby/c0/hardware-configuration.d/c0-1.nix create mode 100644 rossby/c0/hardware-configuration.d/c0-12.nix create mode 100644 rossby/c0/hardware-configuration.d/c0-7.nix create mode 100644 rossby/c0/ssh_host_key.d/c0-1.pub create mode 100644 rossby/c0/ssh_host_key.d/c0-12.pub create mode 100644 rossby/c0/ssh_host_key.d/c0-7.pub diff --git a/rossby/c0/default.nix b/rossby/c0/default.nix index b11bc22..b0866df 100644 --- a/rossby/c0/default.nix +++ b/rossby/c0/default.nix @@ -46,7 +46,7 @@ let automount.enable = true; users = true; opt = true; - work = true; + work = false; data = false; ceph = false; }; @@ -57,7 +57,7 @@ let name = host.name; address = host.address; }; - os.externalInterface = "enp65s0f0"; + os.externalInterface = host.iface; hpc.compute = true; # hpc.knem = true; }; @@ -71,18 +71,24 @@ let networking = { hostName = host.name; useDHCP = false; - interfaces. enp65s0f0 = { - useDHCP = false; - ipv4.addresses = [ { - address = host.address; - prefixLength = 24; - } ]; + # interfaces.enp65s0f0 = { + # useDHCP = false; + # ipv4.addresses = [ { + # address = host.address; + # prefixLength = 24; + # } ]; # ipv4.routes = [ { # address = "10.255.242.0"; # prefixLength = 24; # via = "10.255.241.100"; # } ]; - + # }; + interfaces."${host.iface}" = { + useDHCP = false; + ipv4.addresses = [ { + address = host.address; + prefixLength = 24; + } ]; }; # interfaces."ibp1s0.7666" = { # interfaces."ibp1s0" = { diff --git a/rossby/c0/hardware-configuration.d/c0-1.nix b/rossby/c0/hardware-configuration.d/c0-1.nix new file mode 100644 index 0000000..8c17103 --- /dev/null +++ b/rossby/c0/hardware-configuration.d/c0-1.nix @@ -0,0 +1,43 @@ +# 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" "mpt3sas" "ahci" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/864f30ce-29ba-4235-b987-60ade7d47e63"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/92D5-A773"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp34s0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/rossby/c0/hardware-configuration.d/c0-12.nix b/rossby/c0/hardware-configuration.d/c0-12.nix new file mode 100644 index 0000000..b329f64 --- /dev/null +++ b/rossby/c0/hardware-configuration.d/c0-12.nix @@ -0,0 +1,42 @@ +# 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" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bc7c899c-0393-44e3-8ca2-39f0ea6c2b23"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/A4D6-E2C1"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/rossby/c0/hardware-configuration.d/c0-7.nix b/rossby/c0/hardware-configuration.d/c0-7.nix new file mode 100644 index 0000000..5c9be2d --- /dev/null +++ b/rossby/c0/hardware-configuration.d/c0-7.nix @@ -0,0 +1,43 @@ +# 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" "mpt3sas" "ahci" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/2cc718d1-87be-4b7b-8165-8730ae61eac3"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/9D84-1C2A"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp34s0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp65s0f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/rossby/c0/nodes.nix b/rossby/c0/nodes.nix index b22992a..a9a9eb1 100644 --- a/rossby/c0/nodes.nix +++ b/rossby/c0/nodes.nix @@ -4,8 +4,9 @@ let map (n: ( rec { idx = 110 + n; + iface = if n < 11 then "enp34s0np0" else "enp33s0np0"; name = "c0-${toString n}"; address = "172.16.239.${toString idx}"; ipoib = "10.1.6.${toString idx}"; pubkey = ./. + "/ssh_host_key.d/c0-${toString n}.pub"; - })) (filter (x: if x == 1 || x == 7 || x == 12 then false else true) nodes) + })) nodes diff --git a/rossby/c0/ssh_host_key.d/c0-1.pub b/rossby/c0/ssh_host_key.d/c0-1.pub new file mode 100644 index 0000000..214cb9b --- /dev/null +++ b/rossby/c0/ssh_host_key.d/c0-1.pub @@ -0,0 +1,7 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACA3H3ESKGRO78KLPjsDWDQqQClz4xSA5FaGERZy6+ytSQAAAJDbuspe27rK +XgAAAAtzc2gtZWQyNTUxOQAAACA3H3ESKGRO78KLPjsDWDQqQClz4xSA5FaGERZy6+ytSQ +AAAEDhl6Y9mpbujLVNdwJpnBEWEG0WS0J2pWRQ4vs0eV5oczcfcRIoZE7vwos+OwNYNCpA +KXPjFIDkVoYRFnLr7K1JAAAACnJvb3RAbml4b3MBAgM= +-----END OPENSSH PRIVATE KEY----- diff --git a/rossby/c0/ssh_host_key.d/c0-12.pub b/rossby/c0/ssh_host_key.d/c0-12.pub new file mode 100644 index 0000000..0a819d4 --- /dev/null +++ b/rossby/c0/ssh_host_key.d/c0-12.pub @@ -0,0 +1,7 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACBREFoqiFDzqTwocZ1Wz3k0jnmBMJHMokgHcFidwOd8zwAAAJB4//7ceP/+ +3AAAAAtzc2gtZWQyNTUxOQAAACBREFoqiFDzqTwocZ1Wz3k0jnmBMJHMokgHcFidwOd8zw +AAAEBwDtsM5QW6Du9bHGbQHU/YTpdt/J8P5lLKjgIcHJEZhVEQWiqIUPOpPChxnVbPeTSO +eYEwkcyiSAdwWJ3A53zPAAAACnJvb3RAbml4b3MBAgM= +-----END OPENSSH PRIVATE KEY----- diff --git a/rossby/c0/ssh_host_key.d/c0-7.pub b/rossby/c0/ssh_host_key.d/c0-7.pub new file mode 100644 index 0000000..8a84f6a --- /dev/null +++ b/rossby/c0/ssh_host_key.d/c0-7.pub @@ -0,0 +1,7 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACC5lmT0TenTol+N6sQvZzy9koMCD913pybB61ZY2eH5FgAAAJDtUSHc7VEh +3AAAAAtzc2gtZWQyNTUxOQAAACC5lmT0TenTol+N6sQvZzy9koMCD913pybB61ZY2eH5Fg +AAAEBLEf3QRNVmlBwLXvkR2LuRMFbxw7d1AuiE7yNFqj90NrmWZPRN6dOiX43qxC9nPL2S +gwIP3XenJsHrVljZ4fkWAAAACnJvb3RAbml4b3MBAgM= +-----END OPENSSH PRIVATE KEY-----