HASH 87baaca38669
DATE 2025-05-14
SUBJECT hardware: add cache options cpu
FILES 1 CHANGED
HASH 87baaca38669
DATE 2025-05-14
SUBJECT hardware: add cache options cpu
FILES 1 CHANGED
┌─ modules/nixos/hardware/cpu/options.nix ───────────────────────────────────┐
│ diff --git a/modules/nixos/hardware/cpu/options.nix b/modules/nixos/hardware/cpu/o │
│ ptions.nix │
│ index 9cb5f44..618dc79 100644 │
│ --- a/modules/nixos/hardware/cpu/options.nix │
│ +++ b/modules/nixos/hardware/cpu/options.nix │
│ @@ -91,6 +91,33 @@ in { │
│ readOnly = true; │
│ }; │
│ │
│ + cache = { │
│ + l1i = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L1 instruction cache in KiB"; │
│ + example = 192; │
│ + }; │
│ + l1d = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L1 data cache in KiB"; │
│ + example = 192; │
│ + }; │
│ + l2 = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L2 cache in MiB"; │
│ + example = 6; │
│ + }; │
│ + l3 = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L3 cache in MiB"; │
│ + example = 32; │
│ + }; │
│ + }; │
│ + │
│ microArchitecture = mkOption { │
│ type = str; │
│ default = lookupMicroArch cfg; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...ixos/hardware/cpu/options.nix ───┐
│ diff --git a/modules/nixos/hardware/cpu/opti │
│ ons.nix b/modules/nixos/hardware/cpu/options │
│ .nix │
│ index 9cb5f44..618dc79 100644 │
│ --- a/modules/nixos/hardware/cpu/options.nix │
│ +++ b/modules/nixos/hardware/cpu/options.nix │
│ @@ -91,6 +91,33 @@ in { │
│ readOnly = true; │
│ }; │
│ │
│ + cache = { │
│ + l1i = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L1 instructi │
│ on cache in KiB"; │
│ + example = 192; │
│ + }; │
│ + l1d = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L1 data cach │
│ e in KiB"; │
│ + example = 192; │
│ + }; │
│ + l2 = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L2 cache in │
│ MiB"; │
│ + example = 6; │
│ + }; │
│ + l3 = mkOption { │
│ + type = nullOr int; │
│ + default = null; │
│ + description = "Size of L3 cache in │
│ MiB"; │
│ + example = 32; │
│ + }; │
│ + }; │
│ + │
│ microArchitecture = mkOption { │
│ type = str; │
│ default = lookupMicroArch cfg; │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET