diff --git a/modules/xresources.nix b/modules/xresources.nix index cb8dae238..a2396e236 100644 --- a/modules/xresources.nix +++ b/modules/xresources.nix @@ -32,7 +32,7 @@ in { xresources.properties = mkOption { type = with types; let - prim = either bool (either int str); + prim = oneOf [ bool int float str ]; entry = either prim (listOf prim); in nullOr (attrsOf entry); default = null; diff --git a/tests/modules/xresources/xresources-expected.conf b/tests/modules/xresources/xresources-expected.conf index 20b47e508..577605d2a 100644 --- a/tests/modules/xresources/xresources-expected.conf +++ b/tests/modules/xresources/xresources-expected.conf @@ -1,5 +1,6 @@ Test*boolean1: true Test*boolean2: false +Test*float: 12.300000 Test*int: 10 Test*list: list-str, true, false, 10 Test*string: test-string diff --git a/tests/modules/xresources/xresources.nix b/tests/modules/xresources/xresources.nix index 36d092e0d..3f8a83678 100644 --- a/tests/modules/xresources/xresources.nix +++ b/tests/modules/xresources/xresources.nix @@ -7,6 +7,7 @@ "Test*boolean1" = true; "Test*boolean2" = false; "Test*int" = 10; + "Test*float" = 12.3; "Test*list" = [ "list-str" true false 10 ]; }; };