In NixOS how can I manage the system installed packages?

If I run nix-env -q from root I get the packages installed by root (and available to all the users), but many are missing like ssh, the whole kde, the kernel and so on.

Also, how is this "system-profile" handled? Is it upgraded when I upgrade with nix-env -u '*'?

1 Answer 1


for system packages on nixos it is probably best to keep then in configuration.nix file (environment.systemPackages)

  • 1
    Also, how is this "system-profile" handled? It's part of the system evaluation, so it's only switched by nixos-rebuild; e.g. all versions are consistent in the system. Jun 4, 2016 at 22:02
  • for every change you do in your configuration.nix you need to trigger nixos-rebuild. The same is true when you add/remove packages from environment.systemPackages list.
    – Rok Garbas
    Jun 17, 2016 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.