I found these interesting Nix OS articles series for users that want to try it and learn first things, have a good reading!
- NixOS Series #1: Why Should You Consider Using NixOS?
- NixOS Series #2: How to Install NixOS on a Virtual Machine?
- NixOS Series #3: Install and Remove Packages in NixOS
- NixOS Series #4: Things To Do After Installing NixOS
- NixOS Series #5: How to set up home-manager on NixOS?
#nixos #linux #tutorial #guide
I do think it’s important to emphasize the difference between installing software in user environments and system wide, which is why the tool is named nix-env. System packages must be installed via the nixos configuration file and a rebuild.
To me the biggest missing piece for new users is a tool to help manage your system configuration and reduce the frustration of having to constantly look up nix syntax or nixpkgs quirks. Maybe thinking of it as a nixos/nix IDE? Also a polished distribution built on nixos would be a good starting point (and easy to do, I didn’t realize I could just copy someone else’s configuration until well after I had my system working well enough)
The other thing that got me starting out is the need to garbage collect old packages. It’s not strictly necessary if you have a large enough disk, but it took me several iterations of filling my root partition before I figured out how to properly clean up old generations.
Have a good guide on cleanup? 👀
I think ultimately
Sudo nix-collect-garbage --delete-old
Is my go-to command. For a while I was looking at generations manually, but now I just wait a while (days, a few reboots, or until I need more space) to run this after changing things in case the new stuff is broken.
I think running this as my normal user cleans out old env generations… But I’m not 100% sure.