From 803a4f997688f888e05af52239009c90d72d269d Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:25:40 +0000 Subject: [PATCH] made adRepo a variable --- configuration.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/configuration.nix b/configuration.nix index bd3af3b..d926aa0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -5,6 +5,7 @@ let adHome = "/srv/appdaemon"; adNixPath = "${adHome}/ad-nix"; adPath = "/usr/src/app"; + adRepo = "https://github.com/jsl12/appdaemon"; adBranch = "hass"; in { @@ -22,15 +23,8 @@ in sudo nix-channel --update && sudo nixos-rebuild switch '') (pkgs.writeShellScriptBin "ad-clone" '' - if [ ! -d ${adNixPath} ]; then - sudo git clone https://gitea.john-stream.com/john/ad-nix ${adNixPath} - sudo chown -R appdaemon:users ${adNixPath} - else - echo "${adNixPath} already exists" - fi - if [ ! -d ${adPath} ]; then - sudo git clone -b ${adBranch} https://github.com/jsl12/appdaemon ${adPath} + sudo git clone -b ${adBranch} ${adRepo} ${adPath} sudo chown -R appdaemon:users ${adPath} else echo "${adPath} already exists"