better cloning

This commit is contained in:
John Lancaster
2024-09-14 00:37:30 +00:00
parent dd6a687971
commit 1e6cda5edb

View File

@@ -28,10 +28,13 @@ in
# appdaemon
];
# Alternatively, use a symlink
system.activationScripts.linkAdNix = lib.mkForce ''
echo "Linking ad-nix repository to ${adTargetPath}"
ln -sfn ${ad_src} ${adTargetPath}
system.userActivationScripts.ad-setup.text = ''
if [ ! -d ${adTargetPath} ]; then
${pkgs.git}/bin/git clone https://gitea.john-stream.com/john/ad-nix ${adTargetPath}
chown -R appdaemon:users ${adTargetPath}
else
${pkgs.git}/bin/git -C ${adTargetPath} pull
fi
'';
virtualisation.docker.enable = true;