How to declare a package in configuration.nix for complete NOOBS

Took me a little bit to figure it out.

So the manual says:

With declarative package management, you specify which packages you want on your system by setting the option environment.systemPackages. For instance, adding the following line to configuration.nix enables the Mozilla Thunderbird email application:

{
  environment.systemPackages = [ pkgs.thunderbird ];
}

I just tried putting that in various places lol … finally found the right spot to add leaf (slightly different, environment.systemPackages already exists!):

environment.systemPackages = with pkgs; [
# This is the package I wanted to add
pkgs.leaf 
];

Then of course run:

sudo nixos-rebuild switch

And all is well!

1 Like

Might as well remove the with pkgs; if you’re writing out pkgs.whatever anyway.

2 Likes