From 5b975093513798e8f2ba6023e34a994b91cc7400 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 7 Jun 2023 20:24:20 +0800 Subject: [PATCH] nixops: add demeter machine --- nixops/demeter-hardware-configuration.nix | 45 +++++++++++++++++++++++ nixops/nixops.nix | 1 + 2 files changed, 46 insertions(+) create mode 100644 nixops/demeter-hardware-configuration.nix diff --git a/nixops/demeter-hardware-configuration.nix b/nixops/demeter-hardware-configuration.nix new file mode 100644 index 00000000..d4776c88 --- /dev/null +++ b/nixops/demeter-hardware-configuration.nix @@ -0,0 +1,45 @@ +# 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" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/c7fa9c3e-56ca-4258-a49c-3f064efbd58c"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/76A2-F01F"; + fsType = "vfat"; + }; + + 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; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + hardware.cpu.intel.updateMicrocode = true; + + system.stateVersion = "23.05"; +} diff --git a/nixops/nixops.nix b/nixops/nixops.nix index 67fd6b76..35ddc9f7 100644 --- a/nixops/nixops.nix +++ b/nixops/nixops.nix @@ -16,4 +16,5 @@ old-nixbld = import ./desktop.nix { host = "old-nixbld"; }; franz = import ./desktop.nix { host = "franz"; }; juno = import ./desktop.nix { host = "juno"; }; + demeter = import ./desktop.nix { host = "demeter"; }; }