NixOS Cheatsheet

If you’ve ever felt overwhelmed by NixOS commands, flakes, or the dreaded garbage collection panic, this guide is for you. It’s not just a cheatsheet—it’s a practical survival kit for running NixOS with flakes, keeping your system clean, and always having a rollback strategy when things go sideways. 🖥️ NixOS Essentials Task Command Show version nixos-version Edit config (classic) sudo nano /etc/nixos/configuration.nix Rebuild + switch sudo nixos-rebuild switch Build only (no switch) sudo nixos-rebuild build Roll back last rebuild sudo nixos-rebuild switch --rollback List generations sudo nix-env --list-generations --profile /nix/var/nix/profiles/system ⚡ Flakes Basics Task Command Init flake nix flake init -t templates#nixos Show flake outputs nix flake show Update all inputs nix flake update --commit-lock-file Update one input nix flake lock --update-input nixpkgs --commit-lock-file Build system sudo nixos-rebuild build --flake .#<hostname> Switch system sudo nixos-rebuild switch --flake .#<hostname> Boot (safe) sudo nixos-rebuild boot --flake .#<hostname> 🔄 Safe Updates & Rollbacks Keeping your system updated is great… until it doesn’t boot. Here’s how to avoid disasters. ...

August 24, 2025 · SarCoptU

Thinking About Computing Needs

After spending days trying to optimise my setup and thinking about the perfect use of my current hardware and also trying to get rid of stuff I don’t use, I came to the conclusion I need more hardware. This is kinda concerning, considering the initial problem I had before all this was that I have too much stuff around. This might have been influenced by watching The Minimalists – Less is Now or John Hammond’s video for his one laptop setup for teaching cybersecurity. ...

February 15, 2022 · SarCoptU