-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
nixos/config: add defaultPackages option #97171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5623d23
to
71e16a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to ever set defaultPackages
to anything but an empty list? If "the default value or an empty list" are the only two valid options, should it maybe be a boolean in the first place?
I see at least one advantage of a list: The default values will show up in the documentation without the need to list them twice. Still, intuitively it feels like it should be a boolean option. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please amend the commit-message to make sure it fits our contribtion guidelines.
186391f
to
c060039
Compare
@timokau good question. you would not set a different list. that's what |
c060039
to
ef6b91d
Compare
f5d9845
to
faf5dbb
Compare
readd perl (used in shell scripts), rsync (needed for NixOps) and strace (common debugging tool) they where previously removed in NixOS#91213 Co-authored-by: Timo Kaufmann <timokau@zoho.com> Co-authored-by: 8573 <8573@users.noreply.github.com>
Should we also add nano to the list? Some people already have another editor installed and may want to get rid of applications they don't use. |
@samuelgrf not in this PR. we can discuss that later |
faf5dbb
to
74b3d66
Compare
Tested again. Everything works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, perfectly fine to backport to 20.09 as well
Motivation for this change
The option makes it possible to remove default packages to have a more minimal system, by setting it to an empty list.
I suggested that in #32405 (comment).
This PR also readds perl, rsync (needed for NixOps) and strace (common debugging tool) which where removed in #91213.
We can add more packages in next release.
Manual:
Things done
I built a VM and made sure perl, rsync and strace are present. Also tested to set it to empty list.
nixos-rebuild build-vm -I nixpkgs=~/code/nixpkgs/ -I nixos-config='/home/davidak/root'
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)