feat: do sudo before nh and exit on fail

This commit is contained in:
Jet 2026-04-01 18:05:42 -07:00
parent 7f627ec2d3
commit 526498ce2a
No known key found for this signature in database

View file

@ -110,6 +110,7 @@
let let
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.x86_64-linux;
nhs = pkgs.writeShellScriptBin "nhs" '' nhs = pkgs.writeShellScriptBin "nhs" ''
sudo -v || exit $?
nh os switch --hostname framework path:. "$@" nh os switch --hostname framework path:. "$@"
''; '';
in in