Merge pull request #276818 from SuperSandro2000/variables-allow-int

nixos/shells-environment: allow int and float in environment variables
This commit is contained in:
Nick Cao 2024-04-17 19:47:26 -04:00 committed by GitHub
commit 217dd89ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ in
strings. The latter is concatenated, interspersed with colon
characters.
'';
type = with types; attrsOf (oneOf [ (listOf str) str path ]);
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else "${v}");
type = with types; attrsOf (oneOf [ (listOf (oneOf [ float int str ])) float int str path ]);
apply = mapAttrs (n: v: if isList v then concatMapStringsSep ":" toString v else toString v);
};
environment.profiles = mkOption {