made adRepo a variable
This commit is contained in:
@@ -5,6 +5,7 @@ let
|
|||||||
adHome = "/srv/appdaemon";
|
adHome = "/srv/appdaemon";
|
||||||
adNixPath = "${adHome}/ad-nix";
|
adNixPath = "${adHome}/ad-nix";
|
||||||
adPath = "/usr/src/app";
|
adPath = "/usr/src/app";
|
||||||
|
adRepo = "https://github.com/jsl12/appdaemon";
|
||||||
adBranch = "hass";
|
adBranch = "hass";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -22,15 +23,8 @@ in
|
|||||||
sudo nix-channel --update && sudo nixos-rebuild switch
|
sudo nix-channel --update && sudo nixos-rebuild switch
|
||||||
'')
|
'')
|
||||||
(pkgs.writeShellScriptBin "ad-clone" ''
|
(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
|
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}
|
sudo chown -R appdaemon:users ${adPath}
|
||||||
else
|
else
|
||||||
echo "${adPath} already exists"
|
echo "${adPath} already exists"
|
||||||
|
|||||||
Reference in New Issue
Block a user