Import the remaining hardware-config settings

This commit is contained in:
Emi Simpson 2022-12-18 12:38:51 -05:00
parent 7241484049
commit a956ecb856
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
3 changed files with 28 additions and 10 deletions

12
hardware-requirements.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
<nixos-hardware/framework>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
}

View File

@ -1,20 +1,15 @@
# sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
{ config, pkgs, ... }:
let systemInformation = import ./system-information.nix; in
{ config, pkgs, lib, ... }:
{
networking.hostName = "kudzu";
imports =
[ # Include the results of the hardware scan.
#
# DON'T FORGET to add your hardware config too
# https://github.com/NixOS/nixos-hardware/
#
# Also make sure to move the swap configuration to the hardware config
/etc/nixos/hardware-configuration.nix
[
./filesystems.nix
./hardware-requirements.nix
<home-manager/nixos>
];
@ -42,6 +37,8 @@
# Enable networking
networking.networkmanager.enable = true;
powerManagement.cpuFreqGovernor = "powersave";
# Set your time zone.
time.timeZone = "America/New_York";
@ -159,6 +156,7 @@
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
@ -221,4 +219,9 @@
libvdpau-va-gl
];
};
}
hardware.enableAllFirmware = true;
hardware.cpu.intel.updateMicrocode = systemInformation.isIntel;
# high-resolution display
hardware.video.hidpi.enable = systemInformation.isHiDPI;
}

View File

@ -2,4 +2,7 @@
rootPartition = "/dev/disk/by-uuid/850e0a62-fd82-4360-b4d7-258817e86380";
swapPartition = "/dev/disk/by-uuid/6144d426-6c5f-4a8a-ac16-d4d5eecbf7a0";
efiPartition = "/dev/disk/by-uuid/E5A8-38EA";
isHiDPI = true;
isIntel = true;
}