feat(justfile): switch away from nh

This commit is contained in:
uku 2025-03-04 09:48:06 +01:00
parent 7e8cd5e3d5
commit b19e3cd860
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
2 changed files with 10 additions and 3 deletions

View file

@ -30,8 +30,8 @@
packages = with pkgs; [
agenix.packages.${system}.default
just
nh
nixfmt-rfc-style
nvd
statix
];
};

View file

@ -5,8 +5,15 @@ check:
nix flake check
switch *args:
@sudo -v
nh os switch --no-nom --ask . -- --keep-going {{args}}
#!/usr/bin/env bash
set -euxo pipefail
flake=$(nix build ".#nixosConfigurations.$(hostname).config.system.build.toplevel" --print-out-paths --no-link --keep-going)
nvd diff /run/current-system "$flake"
read -p "Activate new configuration? [y/N] " answer
if [[ $answer =~ ^[Yy]$ ]]; then
sudo "$flake/bin/switch-to-configuration" switch
fi
rollback:
@sudo -v