feat(packages/rebuild): use nh in rebuild script

This commit is contained in:
Mohammad Rafiq 2025-05-20 19:15:57 +08:00
parent 3ec710af5a
commit 962d00f511
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -42,6 +42,7 @@
enable = true;
enableZshIntegration = true;
};
nh.enable = true;
};
}

View file

@ -8,7 +8,7 @@ pkgs.writeShellScriptBin "rebuild" # sh
echo "--- building the new config... ---"
git add .
nixos-rebuild test --flake . --use-remote-sudo || {
nh os test . || {
echo "Error: nixos-rebuild switch failed. Check the output for details."
exit 1
}
@ -24,7 +24,7 @@ pkgs.writeShellScriptBin "rebuild" # sh
}
echo "--- adding the built configuration to the bootloader... ---"
nixos-rebuild switch --flake . --use-remote-sudo || {
nh os boot . || {
echo "Error: nixos-rebuild switch failed. Check the output for details."
exit 1
}