fix sudo placement, always print footer
All checks were successful
Nix Build / nix build (push) Successful in 11s

This commit is contained in:
atagen 2025-07-10 23:20:25 +10:00
parent 8ba7d1cbab
commit 51d501a68e

View file

@ -39,7 +39,10 @@ let do_build () =
Unix.getenv "MEATS" ^ "#nixosConfigurations." ^ Unix.gethostname ()
^ ".config.system.build.toplevel"
in
do_cmd @@ "sudo nix build --profile /nix/var/nix/profiles/system --out-link " ^ tmpdir ^ "/build " ^ build_target
do_cmd @@ "nix build --out-link " ^ tmpdir ^ "/build " ^ build_target
>>= fun () ->
do_cmd @@ "sudo nix-env --set -p /nix/var/nix/profiles/system " ^ tmpdir
^ "/build"
>>= fun () ->
do_cmd @@ "sudo " ^ tmpdir ^ "/build/bin/switch-to-configuration switch"
>|= fun () -> Unix.unlink @@ tmpdir ^ "/build"
@ -47,10 +50,10 @@ let do_build () =
let yum () =
print_string header;
meat_print "CONSUMING DELICIOUS MEATS..";
do_build () |> function
| Error _ ->
print_string "FAILED TO CONSUME MEATS.";
| _ -> (); print_string footer
( do_build () |> function
| Error _ -> print_string "FAILED TO CONSUME MEATS."
| _ -> () );
print_string footer
let cook () =
print_string header;