nixos-config/justfile
SebastianStork 0b9e9aec38
Some checks are pending
Check & Deploy / generate-matrix (push) Waiting to run
Check & Deploy / build-check (push) Blocked by required conditions
Check & Deploy / flake-check (push) Blocked by required conditions
Check & Deploy / deploy (push) Blocked by required conditions
justfile: Use nixos-rebuild repl for the repl command
2026-02-19 00:01:19 +01:00

86 lines
1.6 KiB
Makefile

set quiet := true
_list:
just --list --unsorted
[group('utility')]
update:
nix flake update --commit-lock-file
[group('utility')]
fmt:
nix fmt
[group('utility')]
check:
nix flake check
[group('utility')]
check-lite:
nix flake check --no-build
[group('utility')]
repair:
nix-store --verify --check-contents --repair
[group('utility')]
repl host='$(hostname)':
nixos-rebuild repl --flake .#{{ host }}
[group('rebuild')]
rebuild mode:
nh os {{ mode }} .
[group('rebuild')]
switch:
just rebuild switch
[group('rebuild')]
test:
just rebuild test
[group('rebuild')]
boot:
just rebuild boot
[group('rebuild')]
reboot:
just boot && reboot
[group('remote')]
deploy +hosts:
for host in {{ hosts }}; do \
nh os switch . --hostname=$host --target-host=$host; \
done
[group('remote')]
install host destination='root@installer':
nix run .#install-anywhere -- {{ host }} {{ destination }}
[group('sops')]
sops-edit path:
just _sops-do "sops edit {{ path }}"
[group('sops')]
sops-update path:
just _sops-do "sops updatekeys {{ path }}"
[group('sops')]
sops-update-all:
just _sops-do "find . -type f -name 'secrets.json' -exec sops updatekeys --yes {} \;"
[group('sops')]
sops-rotate path:
just _sops-do "sops rotate --in-place {{ path }}"
[group('sops')]
sops-rotate-all:
just _sops-do "find . -type f -name 'secrets.json' -exec sops rotate --in-place {} \;"
_sops-do command:
if command -v sops > /dev/null 2>&1; then \
{{ command }}; \
else \
nix develop .#sops --command bash -c "{{ command }}; \
exec zsh"; \
fi