optimize hardware module

This commit is contained in:
Sean Buckley 2022-03-27 22:27:06 -04:00
parent b45cd88a6e
commit c8884e4509
2 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@
hardware = hardware =
nixos-hardware.nixosModules // nixos-hardware.nixosModules //
import lib/hardware.nix "${nixpkgs}/nixos/modules"; import lib/hardware.nix;
forAllSystems = f: nixpkgs.lib.genAttrs forAllSystems = f: nixpkgs.lib.genAttrs
[ "x86_64-linux" "aarch64-linux" ] [ "x86_64-linux" "aarch64-linux" ]

View file

@ -1,12 +1,12 @@
modulesPath: { {
physical = { lib, ... }: lib.mkMerge physical = { lib, ... }: lib.mkMerge
[ [
(import "${modulesPath}/installer/scan/not-detected.nix" { inherit lib; })
{ hardware.cpu.amd.updateMicrocode = true; } { hardware.cpu.amd.updateMicrocode = true; }
{ hardware.cpu.intel.updateMicrocode = true; } { hardware.cpu.intel.updateMicrocode = true; }
{ hardware.enableRedistributableFirmware = true; }
]; ];
qemu = { lib, ... }: lib.mkMerge qemu = { lib, modulesPath, ... }: lib.mkMerge
[ [
(import "${modulesPath}/profiles/qemu-guest.nix" { }) (import "${modulesPath}/profiles/qemu-guest.nix" { })
{ services.qemuGuest.enable = true; } { services.qemuGuest.enable = true; }