refactor(nixos): move system config options to main nixos module

This commit is contained in:
Mohammad Rafiq 2025-06-16 19:17:47 +08:00
parent bf63f44875
commit 91c2790b62
No known key found for this signature in database
20 changed files with 124 additions and 149 deletions

View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
let
inherit (lib) singleton mkOption;
inherit (lib.types) enum;
cfg = config.hardware.platform;
in
{
options.hardware.platform = mkOption {
type = enum [
"amd"
"intel"
];
};
config = {
hardware.cpu.${cfg}.updateMicrocode = true;
boot.kernelModules = singleton "kvm-${cfg}";
};
}