feat(justfile): switch away from nh #1
2 changed files with 10 additions and 3 deletions
|
@ -30,8 +30,8 @@
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
agenix.packages.${system}.default
|
agenix.packages.${system}.default
|
||||||
just
|
just
|
||||||
nh
|
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
nvd
|
||||||
statix
|
statix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
11
justfile
11
justfile
|
@ -5,8 +5,15 @@ check:
|
||||||
nix flake check
|
nix flake check
|
||||||
|
|
||||||
switch *args:
|
switch *args:
|
||||||
@sudo -v
|
#!/usr/bin/env bash
|
||||||
nh os switch --no-nom --ask . -- --keep-going {{args}}
|
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:
|
rollback:
|
||||||
@sudo -v
|
@sudo -v
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue