Something went wrong. Try again.
my multi-platform nix flake
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445# install git hooks (conventional commit linting on commit-msg)hooks: git config core.hooksPath .githooks
# lint commits with commitlint-rs; e.g. `just lint-commit`, `just lint-commit HEAD~5..HEAD`lint-commit *args: @if command -v commitlint >/dev/null 2>&1; then commitlint -f '{{ args }}'; else nix run "nixpkgs#commitlint-rs" -- -f '{{ args }}'; fi
build-sushi: nh os build-image --hostname sushi --image-variant iso .#sushi
provision target: nixos-anywhere --flake .#{{ target }} --ssh-target user@{{ target }} |& nom
switch-os host: nh os switch .#{{ host }}
switch-os-remote host: ssh -t -o StrictHostKeyChecking=accept-new user@{{ host }}.char-ruler.ts.net "if [ ! -d ~/flake ]; then git clone git@tangled.org:yarncat.moe/flake ~/flake; fi; cd ~/flake && git pull --ff-only && nh os switch --elevation-strategy auto .#{{ host }}"
switch-darwin host: nh darwin switch .#{{ host }}
switch-darwin-remote host: ssh -o StrictHostKeyChecking=accept-new user@{{ host }}.char-ruler.ts.net "if [ ! -d ~/flake ]; then git clone git@tangled.org:yarncat.moe/flake ~/flake; fi; cd ~/flake && git pull --ff-only && nh darwin switch .#{{ host }}"
switch-servers: just switch-os-remote bento just switch-os-remote gyoza just switch-darwin-remote ramen
secrets-edit name: if command -v agenix >/dev/null 2>&1; then \ RULES=secrets/secrets.nix agenix -e "secrets/{{ name }}.age"; \ else \ RULES=secrets/secrets.nix nix run github:ryantm/agenix -- -e secrets/{{ name }}.age; \ fi
secrets-rekey: if command -v agenix >/dev/null 2>&1; then \ RULES=secrets/secrets.nix agenix --rekey; \ else \ RULES=secrets/secrets.nix nix --extra-experimental-features "nix-command flakes" run github:ryantm/agenix -- --rekey; \ fi