-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Describe the bug
nix-build -A nixosTests.plotinus
The unique option `environment.variables.XDG_DATA_DIRS' is defined multiple times. Definition values:
- In `/home/user/h/nixpkgs/nixos/modules/programs/plotinus.nix':
[
"/nix/store/ak6k93ba1vngvf4yjw7rsa3an9s0w4if-plotinus-0.2.0/share/gsettings-schemas/plotinus-0.2.0"
]
- In `/home/user/h/nixpkgs/nixos/modules/config/shells-environment.nix': "/nix/store/s1635zhdyz4ysmwncrkdnp6n7n1in3ml-desktops/share"
environment.variables can not be merged when multiple definitions of type str are defined. It does work when all definitions are list, although merging may not be appropriate.
To Reproduce
Steps to reproduce the behavior:
nix-build -A nixosTests.plotinus
Expected behavior
A merge, as is appropriate for XDG_DATA_DIRS, using :
Additional context
Environment variables could be modeled RFC42-style. This allows accurate merging of variables where merging makes sense. It would disallow merging where it is not know to make sense. Merging variables that don't join by : would be possible.
This type could be exposed to all of NixOS (not just environment.variables, but environments in systemd as well, for example). They could even be used outside NixOS; for example in arion, nix-processmgt, etc.
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:Metadata
Metadata
Assignees
Labels
Projects
Status