This commit is contained in:
m3tam3re
2024-11-02 18:03:16 +01:00
parent d0b1d9b775
commit d22b436fb1
5 changed files with 159 additions and 1 deletions

42
justfile Normal file
View File

@ -0,0 +1,42 @@
# List available commands
default:
@just --list
# Deploy system configuration
deploy SYSTEM:
nixos-rebuild switch --flake .#{{SYSTEM}} --target-host {{SYSTEM}} --use-remote-sudo
# Update flake
update:
nix flake update
# Commit and push changes
commit MESSAGE:
git add .
git commit -m "{{MESSAGE}}"
git push
# Update, commit, and push changes
update-and-commit MESSAGE: update
@just commit "{{MESSAGE}}"
# Deploy, update, commit, and push changes
deploy-update-commit SYSTEM MESSAGE: (deploy SYSTEM) update
@just commit "{{MESSAGE}}"
# Check flake
check:
nix flake check
# Show flake info
show:
nix flake show
# Build system configuration
build SYSTEM:
nixos-rebuild build --flake .#{{SYSTEM}}
# Enter a development shell
dev-shell:
nix develop