Minor build improvements
Not sure if the features come from the new nixos-rebuild but good this simplifies things.
This commit is contained in:
parent
66885ab02e
commit
b170a1581d
3 changed files with 29 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue