- How to update and push flake inputs:
nix flake update
nix flake archive --json \
| jq -r '.path,(.inputs|to_entries[].value.path)' \
| cachix push bonfire
- How to build and push flake package:
nix build --json .#package \
| jq -r '.[].outputs | to_entries[].value' \
| cachix push bonfire
- How to rebuild system with git submodules:
sudo nixos-rebuild switch --flake ".?submodules=1#astora"
- How to rebuild remote system from local system with git submodules:
nixos-rebuild switch --flake ".?submodules=1#catarina" --build-host l-nafaryus@astora --target-host l.nafaryus@catarina --use-remote-sudo
- How to repair corrupted links in nix-store:
nix-store --verify --check-contents --repair
- How to get hash for package sources:
nix flake prefetch --json github:OpenFOAM/OpenFOAM-11/20240704