From 1e6cda5edb3cd04f2a08a474189f29a6f22ec260 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sat, 14 Sep 2024 00:37:30 +0000 Subject: [PATCH] better cloning --- configuration.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index 1724f8d..184ca76 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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;