33 lines
898 B
Makefile
33 lines
898 B
Makefile
# Hide the default option from the recipes list
|
|
_default: print-recipes
|
|
|
|
# Escape codes for text formatting
|
|
bold := `tput bold`
|
|
normal := `tput sgr0`
|
|
|
|
find-results:
|
|
find . -name '*result*'
|
|
|
|
print-recipes:
|
|
@just --list
|
|
|
|
update:
|
|
nix flake update
|
|
|
|
@edit-secrets:
|
|
git clone ssh://forgejo@git.toast003.xyz:4222/Toast/nix-secrets.git /tmp/secrets
|
|
sed -i 's\git+ssh://forgejo@git.toast003.xyz:4222/Toast/nix-secrets\/tmp/secrets\g' flake.nix
|
|
nix flake update secrets
|
|
echo "{{bold}}All done!"
|
|
echo "{{normal}}Remember to restore flake.nix"
|
|
echo ""
|
|
echo ""
|
|
|
|
alias build := build-nixos
|
|
# Build a NixOS configuration
|
|
build-nixos host=`hostname`:
|
|
nom build .#nixosConfigurations.{{host}}.config.system.build.toplevel
|
|
|
|
# nix-diff with some parameters piped to less
|
|
nix-diff left right:
|
|
nix-diff --color=always --skip-already-compared {{left}} {{right}} | less -F
|