Minor build improvements

Not sure if the features come from the new nixos-rebuild but good this
simplifies things.
This commit is contained in:
Geoffrey Frogeye 2025-12-06 13:08:53 +01:00
parent 66885ab02e
commit b170a1581d
3 changed files with 29 additions and 15 deletions

View file

@ -5,6 +5,9 @@
(pkgs.writeShellApplication {
name = "rb";
text = ''
info() {
echo -e '\033[1;34m'"$*"'\033[0m'
}
verb="switch"
if [ "$#" -ge 1 ]
then
@ -14,7 +17,9 @@
nixos_flake="$(readlink -f /etc/nixos)"
if [ -f "$nixos_flake/flake.nix" ]
then
info "Updating local flakes"
update-local-flakes "$nixos_flake"
info "Starting script"
nix run "$nixos_flake#nixosRebuild" -- "$verb" "$@"
fi
# TODO Fix nix-on-droid and home-manager