From 50c277a6bb094e1bf1875558e918952977994148 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Mon, 20 Nov 2023 15:03:39 +0300 Subject: [PATCH] Don't download git and nom on every rebuild --- README.md | 2 +- rebuild.nu | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f37c2ab..85d4348 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Here is the script you need to run to get this working: ```sh nix-shell -p git --command "git clone https://github.com/RGBCube/NixOSConfiguration && cd NixOSConfiguration" -nix-shell -p nu --command "nu rebuild.nu" +nix-shell -p git nix-output-monitor nu --command "nu rebuild.nu" ``` `machine-name` is a machine selected from the machines in the `machines` directory. diff --git a/rebuild.nu b/rebuild.nu index ede3d78..99acfc4 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -24,8 +24,5 @@ def main [ exit } - sudo --validate - nix-shell --packages git nix-output-monitor --command $"sudo nixos-rebuild switch --log-format internal-json --impure --flake .#($machine) ($arguments | str join ' ') |& nom --json" + sudo nixos-rebuild switch --log-format internal-json --impure --flake (".#" + $machine) ($arguments | str join ' ') | nom --json } - -