From c8978534dc297e108c5fd214f3704421dfda97de Mon Sep 17 00:00:00 2001 From: atagen Date: Thu, 26 Jun 2025 23:40:43 +1000 Subject: [PATCH] simplify yum command --- lib/meat.ml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/meat.ml b/lib/meat.ml index 93095e4..7ef5165 100644 --- a/lib/meat.ml +++ b/lib/meat.ml @@ -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;