From bbc4d663a9dac08811d54c0215d83fb9f66f3cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Sun, 2 Jun 2024 17:55:40 +0800 Subject: [PATCH] nixops: add new machines --- nixops/jupiter-hardware-configuration.nix | 43 +++++++++++++++++++++++ nixops/nixops.nix | 2 ++ nixops/saturn-hardware-configuration.nix | 43 +++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 nixops/jupiter-hardware-configuration.nix create mode 100644 nixops/saturn-hardware-configuration.nix diff --git a/nixops/jupiter-hardware-configuration.nix b/nixops/jupiter-hardware-configuration.nix new file mode 100644 index 0000000..6a6ef60 --- /dev/null +++ b/nixops/jupiter-hardware-configuration.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" "thunderbolt" "ahci" "nvme" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/315af039-6799-43ac-8999-7da69a6fbd1e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/45B7-790E"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.enp86s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = true; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + system.stateVersion = "24.05"; +} diff --git a/nixops/nixops.nix b/nixops/nixops.nix index 5ff31db..9178b59 100644 --- a/nixops/nixops.nix +++ b/nixops/nixops.nix @@ -18,4 +18,6 @@ vulcan = import ./desktop.nix { host = "vulcan"; }; rc = import ./desktop.nix { host = "rc"; }; athena = import ./desktop.nix { host = "athena"; }; + jupiter = import ./desktop.nix { host = "jupiter"; }; + saturn = import ./desktop.nix { host = "saturn"; }; } diff --git a/nixops/saturn-hardware-configuration.nix b/nixops/saturn-hardware-configuration.nix new file mode 100644 index 0000000..dd07b67 --- /dev/null +++ b/nixops/saturn-hardware-configuration.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" "thunderbolt" "ahci" "nvme" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/51d521ec-4807-4b71-8a89-116b89f72d2e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/877D-AF6A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.enp86s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = true; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + system.stateVersion = "24.05"; +}