From 127c928c2372a65924830d2db1e74296e351dca5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Jan 2015 14:02:47 +0100 Subject: [PATCH] nixos/rename: Fix merging multiple destinations. The renaming of options define the original value for the new attribute path. This works well if there is only *one* target, but if there are more, we end up recursing into the attribute set of the option definition itself. We now check for that within the parent recursion node (we can't check that from the subnode, because we lack that information about whether it's defined multiple times) and if the subnode consist entirely of a list of definitions, we use mkMerge on it. Signed-off-by: aszlig --- nixos/modules/rename.nix | 7 ++++--- nixos/modules/services/x11/desktop-managers/kde4.nix | 8 -------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 20fd76855d9..1efc278aeb2 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -33,7 +33,8 @@ let zipModules = list: zipAttrsWith (n: v: if tail v != [] then - if n == "_type" then (head v) + if all (o: isAttrs o && o ? _type) v then mkMerge v + else if n == "_type" then head v else if n == "warnings" then concatLists v else if n == "description" || n == "apply" then abort "Cannot rename an option to multiple options." @@ -115,8 +116,8 @@ in zipModules ([] ++ obsolete [ "nix" "proxy" ] [ "networking" "proxy" "default" ] # KDE -++ deprecated [ "kde" "extraPackages" ] [ "environment" "kdePackages" ] -# ++ obsolete [ "environment" "kdePackages" ] [ "environment" "systemPackages" ] # !!! doesn't work! +++ deprecated [ "kde" "extraPackages" ] [ "environment" "systemPackages" ] +++ obsolete [ "environment" "kdePackages" ] [ "environment" "systemPackages" ] # Multiple efi bootloaders now ++ obsolete [ "boot" "loader" "efi" "efibootmgr" "enable" ] [ "boot" "loader" "efi" "canTouchEfiVariables" ] diff --git a/nixos/modules/services/x11/desktop-managers/kde4.nix b/nixos/modules/services/x11/desktop-managers/kde4.nix index 16c99862e9e..21b6243ba18 100644 --- a/nixos/modules/services/x11/desktop-managers/kde4.nix +++ b/nixos/modules/services/x11/desktop-managers/kde4.nix @@ -70,14 +70,6 @@ in description = "Custom kde-workspace, used for NixOS rebranding."; }; }; - - environment.kdePackages = mkOption { - default = []; - example = literalExample "[ pkgs.kde4.kdesdk ]"; - type = types.listOf types.package; - description = "This option is obsolete. Please use instead."; - }; - };