From 12503d32e29c8941e991c3f9c559645808ee0bec Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Sun, 16 Apr 2023 17:48:54 +0200 Subject: [PATCH] [General] Move aviallon.general.cpu* into aviallon.general.cpu.* --- general.nix | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/general.nix b/general.nix index a1b3337..a6391ba 100644 --- a/general.nix +++ b/general.nix @@ -7,6 +7,9 @@ in { imports = [ (mkRemovedOptionModule [ "aviallon" "general" "flakes" "enable" ] "Flakes are now enabled by default") + (mkRenamedOptionModule [ "aviallon" "general" "cpuVendor" ] [ "aviallon" "general" "cpu" "vendor" ]) + (mkRenamedOptionModule [ "aviallon" "general" "cpuArch" ] [ "aviallon" "general" "cpu" "arch" ]) + (mkRenamedOptionModule [ "aviallon" "general" "cpuTune" ] [ "aviallon" "general" "cpu" "tune" ]) ]; options.aviallon.general = { @@ -26,24 +29,26 @@ in type = with types; nullOr ints.positive; }; - cpuVendor = mkOption { - default = null; - example = "amd"; - description = "Vendor of you CPU. Either AMD or Intel"; - type = types.str; - }; + cpu = { + vendor = mkOption { + default = null; + example = "amd"; + description = "Vendor of you CPU. Either AMD or Intel"; + type = types.str; + }; - cpuArch = mkOption { - default = "x86-64"; - example = "x86-64-v2"; - description = "Set CPU arch used in overlays, ..."; - type = types.str; - }; - cpuTune = mkOption { - default = "generic"; - example = "sandybridge"; - description = "Set CPU tuning for compilers"; - type = types.str; + arch = mkOption { + default = "x86-64"; + example = "x86-64-v2"; + description = "Set CPU arch used in overlays, ..."; + type = types.str; + }; + tune = mkOption { + default = "generic"; + example = "sandybridge"; + description = "Set CPU tuning for compilers"; + type = types.str; + }; }; unsafeOptimizations = mkEnableOption "unsafe system tuning"; debug = mkEnableOption "debug-specific configuration";