From d243d68c72e8a21e7b950b39b01b12e20a905e4a Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 3 Jun 2023 11:12:04 -0400 Subject: [PATCH] merge swan hardware file into host config --- hosts/swan/default.nix | 18 ++++++++----- hosts/swan/hardware-configuration.nix | 39 --------------------------- 2 files changed, 12 insertions(+), 45 deletions(-) delete mode 100644 hosts/swan/hardware-configuration.nix diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index 58e2997..fb57441 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -9,21 +9,27 @@ nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { }; modules = [ - ./hardware-configuration.nix - ../../modules/common - ../../modules/nixos globals - wsl.nixosModules.wsl home-manager.nixosModules.home-manager disko.nixosModules.disko + ../../modules/common + ../../modules/nixos { + # Hardeware server = true; networking.hostName = "swan"; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + powerManagement.cpuFreqGovernor = "powersave"; + hardware.cpu.intel.updateMicrocode = true; + + # ZFS + zfs.enable = true; # head -c 8 /etc/machine-id networking.hostId = "600279f4"; # Random ID required for ZFS - - zfs.enable = true; disko = { enableConfig = true; devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; }); diff --git a/hosts/swan/hardware-configuration.nix b/hosts/swan/hardware-configuration.nix deleted file mode 100644 index 63b8a61..0000000 --- a/hosts/swan/hardware-configuration.nix +++ /dev/null @@ -1,39 +0,0 @@ -# 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" "ahci" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # fileSystems."/" = { - # device = "/dev/disk/by-label/nixos"; - # fsType = "ext4"; - # }; - # - # fileSystems."/boot" = { - # device = "/dev/disk/by-label/boot"; - # 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.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; -}