Add flag set-env-var to MixEnvironment, and rename old ones#11494
Add flag set-env-var to MixEnvironment, and rename old ones#11494roberth merged 3 commits intoNixOS:masterfrom
set-env-var to MixEnvironment, and rename old ones#11494Conversation
c7fae12 to
379c043
Compare
set-var to MixEnvironment, and rename old onesset-var to MixEnvironment, and rename old ones
379c043 to
98e69fd
Compare
98e69fd to
0d52f4b
Compare
roberth
left a comment
There was a problem hiding this comment.
I like that this makes the flag names more consistent, but I'm concerned about the user impact, since many users have opted in to the nix-command feature flag. Perhaps the old names could be kept?
Another issue is that the effect of --set-env-var FOO followed by --unset-env-var FOO may be unexpected. These should be either mutually inclusive, or handled in the order they occur, e.g. by using a map<string, optional<string>> to represent both setting and unsetting/keeping in a single map value. Using nullopt for both unsetting and keeping might be a little weird, so you could also do map<string, variant<bool, string>> instead.
This definitely needs new tests cases to
- test the new flag
- test the interactions.
0d52f4b to
c05fe9b
Compare
|
I have another question following yours. $ nix run --set-env-var FOO '' --unset-env-var FOO --set-env-var FOO '' ...Since we're talking about storing it all in a |
c05fe9b to
289f2ea
Compare
288552b to
29ce075
Compare
|
I gave the tests a go, let me know what you think. |
29ce075 to
a20894e
Compare
|
Apparently, also fixes one more shellcheck case from #10795. |
set-var to MixEnvironment, and rename old onesset-env-var to MixEnvironment, and rename old ones
58ac477 to
16f1163
Compare
Some of these are a bit after the specified time period, but I also believe some of these items are difficult to gauge how much "impact" they had. Helped organize, host, and run, the Summer of Nix Lecture Series 2022 - https://www.youtube.com/playlist?list=PLt4-_lkyRrOMWyp5G-m_d1wtTcbBaOxZk - NixOS/infra#213 Helped organize, and host infra for, the Summer of Nix Lecture Series 2023 - https://www.youtube.com/playlist?list=PLt4-_lkyRrOPcBuz_tjm6ZQb-6rJjU3cf - NixOS/infra#240 Helped organize, host, and was responsible for livestreaming infra during, NixCon Paris 2022 - https://www.youtube.com/playlist?list=PLgknCdxP89ReD6gxl755B6G_CI65z4J2e Maintenance of some nixpkgs packages - NixOS/nixpkgs#340223 (contribution after 2024-05-01) - NixOS/nixpkgs#290084 - NixOS/nixpkgs#170089 Organized, and assembled a team for the FOSDEM 2023 Nix/NixOS Devroom - https://discourse.nixos.org/t/fosdem-2023-nix-and-nixos-devroom/23133 Organizer & sole maintainer of the Config Management Camp Nix track - https://discourse.nixos.org/t/config-management-camp-2023-ghent/23455 - https://discourse.nixos.org/t/config-management-camp-2024-ghent/33852 - https://discourse.nixos.org/t/cfgmgmtcamp-2025-is-looking-for-nix-presentations/51658 (contribution after 2024-05-01) Public speaking & spreading awareness of Nix/NixOS - https://youtu.be/gUjvnZ9ZwMs?si=nDiZTCpQj53wwq8P - https://www.youtube.com/watch?v=hNcYPH5Q_pA&t=862s The occasional dabble into the Nix C++ code base - NixOS/nix#11494 (contribution after 2024-05-01) - NixOS/nix#11490 (contribution after 2024-05-01) - NixOS/nix#11489 (contribution after 2024-05-01) - NixOS/nix#11349 (contribution after 2024-05-01) - NixOS/nix#11241 (contribution after 2024-05-01) - NixOS/nix#9557 - NixOS/nix#8788 - NixOS/nix#8212 - NixOS/nix#5147 General evangelism Pretty much every event I attend, I'm talking about Nix, showing off Nix/NixOS, and just trying to get people to see how awesome this tool is.
277dceb to
35599b8
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
605f195 to
d1e723c
Compare
d1e723c to
4a8a505
Compare
776e81a to
205e145
Compare
205e145 to
c800f3f
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Motivation
Closes: #11495
Closes: #10338
Context
#11490 (comment)
Ref: #11490
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.