Experimental package management with Nix and NixOS

Generation Handling

Creating many generations can waste large amounts of file space. The utility that handles this is problem is nix-env, but you should use the wrapper nix-collect-garbage. nix-collect-garbage has the standard delete option that takes away all old generations. You can do this manually, but more useful is the --delete-older-than option. You should set this as a regular script:

nix-collect-garbage --delete-older-than 10d

Using Nix in the Cloud

Nix is not supported by many cloud companies, but many still provide ISO options. NixOS has a page describing which ones are friendly and which ones you can still get started on. The procedure is similar, though getting the disks created is a bit of a chore when full support is not included. The list of services is available at the project website [4].

Conclusion

Nix is very powerful tool for handling diverse configurations. Many developers appreciate the ease at which they can just run the Nix shell and have all dependencies correctly configured every time. Ordinary users will appreciate the power of rollbacks and the possibility to run old software without bending over backwards.

The Author

Mats Tage Axelsson keeps aging hardware for the challenge of handling crashes. Oh, and he also is a cheapskate.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • NixOS 22.5 Is Now Available

    The latest release of NixOS with a much-improved package manager and a user-friendly graphical installer.

  • NixOS 21.11 Now Available for Download

    NixOS “Porcupine” has been made available for installation and includes numerous improvements.

  • NixOS

    The innovative NixOS makes it easy to test and deploy new configurations – on the hardware and in the cloud

  • NixOS 24.05 Is Ready for Prime Time

    The latest release of NixOS (Uakari) has arrived and offers its usual reproducible, declarative, and reliable goodness.

  • Next Gen Distributions

    With systemd poised to revolutionize the init process, we look at Linux distributions that have left the familiar path, use new approaches and techniques, and are paving the way for the next generation of Linux distros.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News