Hardware stuffies

This commit is contained in:
blahai 2025-01-12 19:18:13 +02:00
parent 63eac33d05
commit 5edcb857af
No known key found for this signature in database
9 changed files with 184 additions and 0 deletions

View file

@ -0,0 +1,17 @@
{
config,
lib,
...
}: let
inherit (config.olympus) device;
inherit (lib.modules) mkIf;
in {
config = mkIf (device.cpu == "amd") {
hardware.cpu.amd.updateMicrocode = true;
boot.kernelModules = [
"kvm-amd"
"amd-pstate"
];
};
}

View file

@ -0,0 +1,17 @@
{lib, ...}: let
inherit (lib) mkOption types;
in {
imports = [
./amd.nix
];
options.olympus.device.cpu = mkOption {
type = types.nullOr (
types.enum [
"amd"
]
);
default = null;
description = "CPU brand";
};
}