nix-config-notthebee/justfile
Wolfgang 697d9d92d0
WIP: Big refactoring and reformatting (#150)
* Remove unused with pkgs

* Big refactoring
2025-09-10 12:57:10 +02:00

23 lines
793 B
Makefile

# vim: set ft=make :
set quiet
update:
nix flake update
build-iso $host:
just copy {{ host }}; ssh {{ host }} "nix-shell -p nixos-generators.out --run 'nixos-generate -c /etc/nixos/machines/installer/default.nix -f install-iso -I nixpkgs=channel:nixos-25.05'"
check:
nix flake check
dry-run $host:
nixos-rebuild-ng dry-activate --flake .#{{host}} --target-host {{host}} --build-host {{host}} --no-reexec --sudo
deploy $host: (copy host)
nixos-rebuild-ng switch --flake .#{{host}} --target-host {{host}} --build-host {{host}} --no-reexec --sudo
check-clean:
if [ -n "$(git status --porcelain)" ]; then echo -e "\e[31merror\e[0m: git tree is dirty. Refusing to copy configuration." >&2; exit 1; fi
copy $host:
rsync -ax --delete --rsync-path="sudo rsync" ./ {{host}}:/etc/nixos/