From 3f2c908924af20a11d517d68cbef501d0588b362 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 27 Jul 2023 13:27:42 -0500 Subject: [PATCH] Add hardware config --- os/linux/nix/machines/beefcake-hardware.nix | 57 +++++++++++++++++++++ os/linux/nix/machines/beefcake.nix | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 os/linux/nix/machines/beefcake-hardware.nix diff --git a/os/linux/nix/machines/beefcake-hardware.nix b/os/linux/nix/machines/beefcake-hardware.nix new file mode 100644 index 0000000..e31d51c --- /dev/null +++ b/os/linux/nix/machines/beefcake-hardware.nix @@ -0,0 +1,57 @@ +# 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 = [ "ehci_pci" "megaraid_sas" "usbhid" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/0747dcba-f590-42e6-89c8-6cb2f9114d64"; + fsType = "ext4"; + options = [ + "usrquota" + ]; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/7E3C-9018"; + fsType = "vfat"; + }; + + fileSystems."/storage" = + { + device = "/dev/disk/by-uuid/ea8258d7-54d1-430e-93b3-e15d33231063"; + fsType = "btrfs"; + options = [ + "compress=zstd:5" + "space_cache=v2" + ]; + }; + + 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.eno3.useDHCP = lib.mkDefault true; + # networking.interfaces.eno4.useDHCP = lib.mkDefault true; + # networking.interfaces.enp68s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp68s0f1.useDHCP = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/os/linux/nix/machines/beefcake.nix b/os/linux/nix/machines/beefcake.nix index 684dcb6..82bbd74 100644 --- a/os/linux/nix/machines/beefcake.nix +++ b/os/linux/nix/machines/beefcake.nix @@ -11,7 +11,7 @@ in imports = [ - ./hardware-configuration.nix + ./beefcake-hardware.nix ]; sops = {