From 3ecdcd5ff619267b964c4d23012cfa3742b1d6ec Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 2 May 2024 19:57:29 -0400 Subject: [PATCH] hoenn: allow cli override of variable names --- nixosModules/scripts/hoenn/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixosModules/scripts/hoenn/default.nix b/nixosModules/scripts/hoenn/default.nix index d774a980..9d019bdd 100644 --- a/nixosModules/scripts/hoenn/default.nix +++ b/nixosModules/scripts/hoenn/default.nix @@ -5,9 +5,9 @@ ... }: let hoenn = pkgs.writeShellScriptBin "hoenn" '' - FLAKE="github:alyraffauf/nixcfg" - HOST=${config.networking.hostName} - FLAKE_SRC="https://github.com/alyraffauf/nixcfg.git" + FLAKE=''${FLAKE:-"github:alyraffauf/nixcfg"} + HOST=''${HOST:-${config.networking.hostName}} + GIT=''${GIT:-"https://github.com/alyraffauf/nixcfg.git"} if [ "$1" = "sync" ]; then if [ "$2" == "" ] || [ "$2" == "now" ]; then @@ -21,7 +21,7 @@ sudo ${pkgs.nix}/bin/nix-collect-garbage -d exit 0; elif [ "$1" == "clone" ]; then - ${pkgs.git}/bin/git clone $FLAKE_SRC + ${pkgs.git}/bin/git clone $GIT cd nixcfg exit 0; fi