nix/justfile
2025-12-03 16:08:06 +01:00

46 lines
No EOL
1,021 B
Makefile

set positional-arguments
set export
[private]
default:
@just --list --justfile {{justfile()}}
# Run nix flake check
flake-check:
@echo "Running nix flake check..."
nix flake check
flake-build target:
@echo "Running flake check on ${target}..."
nix build ".#nixosConfigurations."${target}".config.system.build.toplevel"
unlink result
# Apply configuration using colmena
apply target:
@echo "Applying configuration to ${target}..."
colmena apply --on ${target}
# Build configuration using colmena
build target:
@echo "Building configuration for ${target}..."
colmena build --on ${target}
# Enter a development shell
dev:
@echo "Entering development shell..."
nix develop
# Run garbage collection
gc:
@echo "Running garbage collection..."
nix-collect-garbage -d
fmt:
@echo "Formatting project..."
find . -name '*.nix' -not -path './.direnv/*' -not -path './.git/*' | xargs nix fmt --
alias a:= apply
alias b:= build
alias d:= dev
alias fb:= flake-build
alias fc:= flake-check