Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 758 Bytes

cheatsheet.md

File metadata and controls

30 lines (18 loc) · 758 Bytes

Cheat Sheet

Inputs

  • Update a single input: nix flake lock --update-input INPUT

NixOS

  • Update now: nixos-rebuild switch --flake .
  • Update on boot: nixos-rebuild boot --flake .

Home Manager

  • Bootstrap: nix run nixpkgs#home-manager -- switch --flake .
  • Update: home-manager switch --flake .

Managing NixOS generations

  • List: nix-env --profile /nix/var/nix/profiles/system --list-generations
  • Remove specific: nix-env --profile /nix/var/nix/profiles/system --delete-generations N ...

Managing Home Manager generations

  • List: home-manager generations
  • Remove specific: home-manager remove-generations N ...
  • Remove old: home-manager expire-generations "-7days"

Store

  • Garbage collect: nix store gc