simplify yum command

This commit is contained in:
atagen 2025-06-26 23:40:43 +10:00
parent a1a0b134ad
commit c8978534dc

View file

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