bash: change sessionVariables to attrsOf ... (#7300)

I had programs.bash.sessionVariables.CDPATH = ... defined in the
different nix files. One was taken into account and the other one
ignored.

Turns out plain "types.attrs" has the following merging strategy:

===
merge = loc: foldl' (res: def: res // def.value) { };
===

Changing it to "attrsOf", the module system warned me of the conflicting
values.
This commit is contained in:
Matthieu Coudron 2025-06-30 17:19:07 +02:00 committed by GitHub
parent f6deff178c
commit 0f21ed5182
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -137,7 +137,7 @@ in
sessionVariables = mkOption {
default = { };
type = types.attrs;
type = with types; lazyAttrsOf (either str int);
example = {
MAILCHECK = 30;
};