feat(justfile): switch away from nh
This commit is contained in:
parent
7e8cd5e3d5
commit
b19e3cd860
2 changed files with 10 additions and 3 deletions
|
@ -30,8 +30,8 @@
|
|||
packages = with pkgs; [
|
||||
agenix.packages.${system}.default
|
||||
just
|
||||
nh
|
||||
nixfmt-rfc-style
|
||||
nvd
|
||||
statix
|
||||
];
|
||||
};
|
||||
|
|
11
justfile
11
justfile
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue