From 21202fe8a441ee2c673193fc785d4c4d8ee9d67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 3 May 2024 13:43:20 +0200 Subject: [PATCH 1/3] nixos/shells-environment: remove floats again because of their unpredictable formatting --- nixos/modules/config/shells-environment.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index 2c19fb8a029d..f3f8eb182563 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -42,7 +42,7 @@ in strings. The latter is concatenated, interspersed with colon characters. ''; - type = with types; attrsOf (oneOf [ (listOf (oneOf [ float int str ])) float int str path ]); + type = with types; attrsOf (oneOf [ (listOf (oneOf [ int str ])) int str path ]); apply = mapAttrs (n: v: if isList v then concatMapStringsSep ":" toString v else toString v); }; From ed38b9699a3a6680eb323cfbe0f199295ce3e3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 3 May 2024 13:43:43 +0200 Subject: [PATCH 2/3] nixos/shells-environment: copy paths to the store again like before #276818 --- nixos/modules/config/shells-environment.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index f3f8eb182563..49aae5ab438d 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -43,7 +43,9 @@ in characters. ''; type = with types; attrsOf (oneOf [ (listOf (oneOf [ int str ])) int str path ]); - apply = mapAttrs (n: v: if isList v then concatMapStringsSep ":" toString v else toString v); + apply = let + toStr = v: if isPath v then "${v}" else toString v; + in mapAttrs (n: v: if isList v then concatMapStringsSep ":" toStr v else toStr v); }; environment.profiles = mkOption { From d917bac7c5e95e7534e258479c2eb79052142985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 3 May 2024 13:44:03 +0200 Subject: [PATCH 3/3] nixos/shells-environment: allow lists of paths --- nixos/modules/config/shells-environment.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index 49aae5ab438d..50796f8bc6f1 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -42,7 +42,7 @@ in strings. The latter is concatenated, interspersed with colon characters. ''; - type = with types; attrsOf (oneOf [ (listOf (oneOf [ int str ])) int str path ]); + type = with types; attrsOf (oneOf [ (listOf (oneOf [ int str path ])) int str path ]); apply = let toStr = v: if isPath v then "${v}" else toString v; in mapAttrs (n: v: if isList v then concatMapStringsSep ":" toStr v else toStr v);