From c5cff5667dd97b31192234fafda41db1f1c189e0 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 26 Dec 2025 23:50:53 -0600 Subject: [PATCH] Update Genesis for hardware support --- hosts/genesis/default.nix | 16 +++++---- hosts/genesis/hardware-configuration.nix | 45 +++++++++++++++++------- hosts/genesis/networking/dhcp.nix | 2 +- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/hosts/genesis/default.nix b/hosts/genesis/default.nix index 71f4022..aac76c6 100644 --- a/hosts/genesis/default.nix +++ b/hosts/genesis/default.nix @@ -19,10 +19,15 @@ }; # Bootloader. - boot.loader.grub = { - enable = true; - device = "/dev/vda"; - useOSProber = true; + boot.loader = { + efi = { + canTouchEfiVariables = true; + }; + systemd-boot = { + enable = true; + configurationLimit = 10; + edk2-uefi-shell.enable = true; + }; }; environment.systemPackages = with pkgs; [ @@ -31,7 +36,4 @@ ]; networking.hostName = "genesis"; # Define your hostname. - - virtualisation.oci-containers.containers = { - }; } diff --git a/hosts/genesis/hardware-configuration.nix b/hosts/genesis/hardware-configuration.nix index 16b048b..2041e05 100644 --- a/hosts/genesis/hardware-configuration.nix +++ b/hosts/genesis/hardware-configuration.nix @@ -1,28 +1,48 @@ # 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. -{ lib, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.initrd.availableKernelModules = [ - "ata_piix" - "uhci_hcd" - "virtio_pci" - "sr_mod" - "virtio_blk" + "xhci_pci" + "ahci" + "nvme" + "uas" + "sd_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; fileSystems."/" = { - device = "/dev/disk/by-uuid/a13f941e-4985-47ab-a8c6-374a627c5ce1"; - fsType = "ext4"; + device = "/dev/disk/by-uuid/d26b973f-fe56-4055-ac1b-ed1bf93e5221"; + fsType = "btrfs"; + options = [ "subvol=@" ]; }; - - swapDevices = [ { device = "/dev/disk/by-uuid/ac4557de-1ad5-4d3c-b9f4-5ec50dbf76f1"; } ]; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/d26b973f-fe56-4055-ac1b-ed1bf93e5221"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/A0B6-DDFA"; + 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 @@ -31,4 +51,5 @@ networking.useDHCP = lib.mkDefault true; # networking.interfaces.ens18.useDHCP = lib.mkDefault true; # networking.interfaces.ens19.useDHCP = lib.mkDefault true; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/genesis/networking/dhcp.nix b/hosts/genesis/networking/dhcp.nix index c68434b..69cddf0 100644 --- a/hosts/genesis/networking/dhcp.nix +++ b/hosts/genesis/networking/dhcp.nix @@ -5,7 +5,7 @@ routerIP, }: { - enable = true; + enable = false; settings = { control-sockets = [ {