nix-config/docs/cheatsheet.md

920 B

cheatsheet

quick commands for daily use.

rebuild

# poppy (macbook)
darwin-rebuild switch --flake .#poppy

# muscari (server)
sudo nixos-rebuild switch --flake .#muscari

update

# update flakes then rebuild
nix flake update && darwin-rebuild switch --flake .#poppy

check

# validate before applying
nix flake check

# dry run (see what would change)
darwin-rebuild switch --flake .#poppy --dry-run

cleanup

# remove old generations
nix-collect-garbage -d

# or with sudo on nixos
sudo nix-collect-garbage -d

shell

ll          # detailed list with icons
cd <dir>    # actually zoxide - remembers frequent paths
ff          # fastfetch system info

navigation

cd <partial>      # zoxide - jump to frequent dir
cd ..             # parent directory
ctrl+r            # fzf history search
ctrl+t            # fzf file finder