From 017302483c2c4372e7a680f390d7bb861335d849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sun, 7 May 2023 22:20:49 +0200 Subject: [PATCH] xfconf: fix type order (#3961) Submodules must come after strings, otherwise strings are treated as paths and implicitly imported. --- modules/misc/xfconf.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/misc/xfconf.nix b/modules/misc/xfconf.nix index 423126ff5..ab21a66b3 100644 --- a/modules/misc/xfconf.nix +++ b/modules/misc/xfconf.nix @@ -75,14 +75,9 @@ in { settings = mkOption { type = with types; - attrsOf (attrsOf (oneOf [ - bool - int - xfIntVariant - float - str - (listOf (oneOf [ bool int xfIntVariant float str ])) - ])) // { + # xfIntVariant must come AFTER str; otherwise strings are treated as submodule imports... + let value = oneOf [ bool int float str xfIntVariant ]; + in attrsOf (attrsOf (either value (listOf value))) // { description = "xfconf settings"; }; default = { };