mirror of
https://github.com/blahai/nyx.git
synced 2025-06-09 10:53:01 -04:00
Hardware stuffies
This commit is contained in:
parent
63eac33d05
commit
5edcb857af
9 changed files with 184 additions and 0 deletions
17
modules/nixos/hardware/cpu/amd.nix
Normal file
17
modules/nixos/hardware/cpu/amd.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
17
modules/nixos/hardware/cpu/default.nix
Normal file
17
modules/nixos/hardware/cpu/default.nix
Normal 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";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue