- Update a single input:
nix flake lock --update-input INPUT
- Update now:
nixos-rebuild switch --flake .
- Update on boot:
nixos-rebuild boot --flake .
- Bootstrap:
nix run nixpkgs#home-manager -- switch --flake .
- Update:
home-manager switch --flake .
- List:
nix-env --profile /nix/var/nix/profiles/system --list-generations
- Remove specific:
nix-env --profile /nix/var/nix/profiles/system --delete-generations N ...
- List:
home-manager generations
- Remove specific:
home-manager remove-generations N ...
- Remove old:
home-manager expire-generations "-7days"
- Garbage collect:
nix store gc