From 88c3e1305cbda43fdd4d9570cfa970bfd76adfb4 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Mon, 11 Dec 2023 18:31:55 +0000 Subject: [PATCH] Format hosts hardware-configuration.nix --- hosts/atlas/hardware-configuration.nix | 91 ++++++++++++----------- hosts/eos/hardware-configuration.nix | 93 ++++++++++++------------ hosts/helios/hardware-configuration.nix | 83 +++++++++++---------- hosts/odyssey/hardware-configuration.nix | 89 ++++++++++++----------- 4 files changed, 176 insertions(+), 180 deletions(-) diff --git a/hosts/atlas/hardware-configuration.nix b/hosts/atlas/hardware-configuration.nix index c2c666f..700e6c8 100644 --- a/hosts/atlas/hardware-configuration.nix +++ b/hosts/atlas/hardware-configuration.nix @@ -1,67 +1,66 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.initrd.supportedFilesystems = [ "zfs" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.kernelParams = [ "elevator=none" ]; - boot.extraModulePackages = [ ]; - boot.supportedFilesystems = [ "zfs" ]; + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + initrd.supportedFilesystems = [ "zfs" ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = [ "elevator=none" ]; + extraModulePackages = [ ]; + supportedFilesystems = [ "zfs" ]; + }; - fileSystems."/" = - { device = "rpool/system/root"; - fsType = "zfs"; - }; + fileSystems."/" = { + device = "rpool/system/root"; + fsType = "zfs"; + }; - fileSystems."/home" = - { device = "rpool/user/home"; - fsType = "zfs"; - }; + fileSystems."/home" = { + device = "rpool/user/home"; + fsType = "zfs"; + }; - fileSystems."/nix" = - { device = "rpool/local/nix"; - fsType = "zfs"; - }; + fileSystems."/nix" = { + device = "rpool/local/nix"; + fsType = "zfs"; + }; - fileSystems."/tmp" = - { device = "rpool/local/tmp"; - fsType = "zfs"; - }; + fileSystems."/tmp" = { + device = "rpool/local/tmp"; + fsType = "zfs"; + }; - fileSystems."/var" = - { device = "rpool/system/var"; - fsType = "zfs"; - }; + fileSystems."/var" = { + device = "rpool/system/var"; + fsType = "zfs"; + }; - fileSystems."/var/log" = - { device = "rpool/system/var/log"; - fsType = "zfs"; - }; + fileSystems."/var/log" = { + device = "rpool/system/var/log"; + fsType = "zfs"; + }; - fileSystems."/var/tmp" = - { device = "rpool/system/var/tmp"; - fsType = "zfs"; - }; + fileSystems."/var/tmp" = { + device = "rpool/system/var/tmp"; + fsType = "zfs"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/00B2-0384"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/00B2-0384"; + 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.enp0s25.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/eos/hardware-configuration.nix b/hosts/eos/hardware-configuration.nix index eb82fa6..94b147f 100644 --- a/hosts/eos/hardware-configuration.nix +++ b/hosts/eos/hardware-configuration.nix @@ -1,68 +1,65 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.initrd.supportedFilesystems = [ "zfs" ]; - boot.kernelModules = [ ]; - boot.kernelParams = [ "elevator=none" ]; - boot.extraModulePackages = [ ]; - boot.supportedFilesystems = [ "zfs" ]; + boot = { + initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + initrd.kernelModules = [ ]; + initrd.supportedFilesystems = [ "zfs" ]; + kernelModules = [ ]; + kernelParams = [ "elevator=none" ]; + extraModulePackages = [ ]; + supportedFilesystems = [ "zfs" ]; + }; - fileSystems."/" = - { device = "rpool/system/root"; - fsType = "zfs"; - }; + fileSystems."/" = { + device = "rpool/system/root"; + fsType = "zfs"; + }; - fileSystems."/home" = - { device = "rpool/user/home"; - fsType = "zfs"; - }; + fileSystems."/home" = { + device = "rpool/user/home"; + fsType = "zfs"; + }; - fileSystems."/nix" = - { device = "rpool/local/nix"; - fsType = "zfs"; - }; + fileSystems."/nix" = { + device = "rpool/local/nix"; + fsType = "zfs"; + }; - fileSystems."/tmp" = - { device = "rpool/local/tmp"; - fsType = "zfs"; - }; + fileSystems."/tmp" = { + device = "rpool/local/tmp"; + fsType = "zfs"; + }; - fileSystems."/var" = - { device = "rpool/system/var"; - fsType = "zfs"; - }; + fileSystems."/var" = { + device = "rpool/system/var"; + fsType = "zfs"; + }; - fileSystems."/var/log" = - { device = "rpool/system/var/log"; - fsType = "zfs"; - }; + fileSystems."/var/log" = { + device = "rpool/system/var/log"; + fsType = "zfs"; + }; - fileSystems."/var/tmp" = - { device = "rpool/system/var/tmp"; - fsType = "zfs"; - }; + fileSystems."/var/tmp" = { + device = "rpool/system/var/tmp"; + fsType = "zfs"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/28E6-5509"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/28E6-5509"; + 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.enp0s25.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/helios/hardware-configuration.nix b/hosts/helios/hardware-configuration.nix index 0ec880a..66e8dd0 100644 --- a/hosts/helios/hardware-configuration.nix +++ b/hosts/helios/hardware-configuration.nix @@ -1,62 +1,61 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "zfs" ]; - boot.initrd.kernelModules = [ ]; - boot.initrd.supportedFilesystems = [ "zfs" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.kernelParams = [ "elevator=none" ]; - boot.extraModulePackages = [ ]; - boot.supportedFilesystems = [ "zfs" ]; + boot = { + initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "zfs" ]; + initrd.kernelModules = [ ]; + initrd.supportedFilesystems = [ "zfs" ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = [ "elevator=none" ]; + extraModulePackages = [ ]; + supportedFilesystems = [ "zfs" ]; + }; - fileSystems."/" = - { device = "rpool/system/root"; - fsType = "zfs"; - }; + fileSystems."/" = { + device = "rpool/system/root"; + fsType = "zfs"; + }; - fileSystems."/home" = - { device = "rpool/user/home"; - fsType = "zfs"; - }; + fileSystems."/home" = { + device = "rpool/user/home"; + fsType = "zfs"; + }; - fileSystems."/nix" = - { device = "rpool/local/nix"; - fsType = "zfs"; - }; + fileSystems."/nix" = { + device = "rpool/local/nix"; + fsType = "zfs"; + }; - fileSystems."/tmp" = - { device = "rpool/local/tmp"; - fsType = "zfs"; - }; + fileSystems."/tmp" = { + device = "rpool/local/tmp"; + fsType = "zfs"; + }; - fileSystems."/var/log" = - { device = "rpool/system/var/log"; - fsType = "zfs"; - }; + fileSystems."/var/log" = { + device = "rpool/system/var/log"; + fsType = "zfs"; + }; - fileSystems."/var/tmp" = - { device = "rpool/system/var/tmp"; - fsType = "zfs"; - }; + fileSystems."/var/tmp" = { + device = "rpool/system/var/tmp"; + fsType = "zfs"; + }; - fileSystems."/boot" = - { device = "/dev/sda1"; - fsType = "ext2"; - }; + fileSystems."/boot" = { + device = "/dev/sda1"; + fsType = "ext2"; + }; 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; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/odyssey/hardware-configuration.nix b/hosts/odyssey/hardware-configuration.nix index d30c646..93157e0 100644 --- a/hosts/odyssey/hardware-configuration.nix +++ b/hosts/odyssey/hardware-configuration.nix @@ -5,63 +5,64 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.kernelPackages = pkgs.linuxPackages; - boot.supportedFilesystems = [ "ntfs" ]; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = true; + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + initrd.supportedFilesystems = [ "zfs" ]; + kernelModules = [ "kvm-intel" ]; + kernelPackages = pkgs.linuxPackages; + supportedFilesystems = [ "ntfs" ]; + binfmt.emulatedSystems = [ "aarch64-linux" ]; }; + + hardware = { + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + }; + }; + services.xserver.videoDrivers = [ "nvidia" ]; - fileSystems."/" = - { device = "rpool/system/root"; - fsType = "zfs"; - }; + fileSystems."/" = { + device = "rpool/system/root"; + fsType = "zfs"; + }; - fileSystems."/home" = - { device = "rpool/user/home"; - fsType = "zfs"; - }; + fileSystems."/home" = { + device = "rpool/user/home"; + fsType = "zfs"; + }; - fileSystems."/var" = - { device = "rpool/system/var"; - fsType = "zfs"; - }; + fileSystems."/var" = { + device = "rpool/system/var"; + fsType = "zfs"; + }; - fileSystems."/tmp" = - { device = "rpool/local/tmp"; - fsType = "zfs"; - }; + fileSystems."/tmp" = { + device = "rpool/local/tmp"; + fsType = "zfs"; + }; - fileSystems."/var/log" = - { device = "rpool/system/var/log"; - fsType = "zfs"; - }; + fileSystems."/var/log" = { + device = "rpool/system/var/log"; + fsType = "zfs"; + }; - fileSystems."/var/tmp" = - { device = "rpool/system/var/tmp"; - fsType = "zfs"; - }; + fileSystems."/var/tmp" = { + device = "rpool/system/var/tmp"; + fsType = "zfs"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/E63E-8E75"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/E63E-8E75"; + 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.eno1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }