feat(justfile): switch away from nh #1

Merged
uku merged 5 commits from no-nh into main 2025-03-06 09:40:00 +01:00
2 changed files with 10 additions and 3 deletions
Showing only changes of commit b19e3cd860 - Show all commits

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