nixos/config: add defaultPackages option #97171
Conversation
5623d23 to
71e16a8
Compare
timokau
left a comment
There was a problem hiding this comment.
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? |
Ma27
left a comment
There was a problem hiding this comment.
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 <[email protected]> Co-authored-by: 8573 <[email protected]>
|
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. |
worldofpeace
left a comment
There was a problem hiding this comment.
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'sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)