mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[General+Nix] Add x86 level support and expose this in nix system-features
This commit is contained in:
parent
7b223a9a32
commit
6c4ce14a5c
2 changed files with 19 additions and 2 deletions
16
general.nix
16
general.nix
|
|
@ -38,7 +38,12 @@ in
|
|||
};
|
||||
|
||||
arch = mkOption {
|
||||
default = "x86-64";
|
||||
default =
|
||||
if cfg.cpu.x86.level >= 2 then
|
||||
"x86-64-v${toString cfg.cpu.x86.level}"
|
||||
else
|
||||
"x86-64"
|
||||
;
|
||||
example = "x86-64-v2";
|
||||
description = "Set CPU arch used in overlays, ...";
|
||||
type = types.str;
|
||||
|
|
@ -49,6 +54,15 @@ in
|
|||
description = "Set CPU tuning for compilers";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
x86 = {
|
||||
level = mkOption {
|
||||
default = 1;
|
||||
example = 3;
|
||||
description = "Set supported x86-64 level";
|
||||
type = with types; addCheck int (n: n >= 1 && n <= 4);
|
||||
};
|
||||
};
|
||||
};
|
||||
unsafeOptimizations = mkEnableOption "unsafe system tuning";
|
||||
debug = mkEnableOption "debug-specific configuration";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue