diff options
Diffstat (limited to 'system/services')
-rw-r--r-- | system/services/nix-sync/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix index 49a5169..fbc245b 100644 --- a/system/services/nix-sync/default.nix +++ b/system/services/nix-sync/default.nix @@ -10,7 +10,7 @@ esa = lib.strings.escapeShellArg; execStartScript = pkgs.writeScript "git-sync-exec" '' #! /usr/bin/env dash - cd ${esa cfg.cachePath}/${esa repo.path}; + cd ${esa (cfg.cachePath + "/" + repo.path)}; while true; do origin="$(git rev-parse @{u})"; @@ -31,12 +31,12 @@ done ''; execStartPreScript = '' - if ! stat ${esa cfg.cachePath}/${esa repo.path}/.git; then + if ! stat ${esa (cfg.cachePath + "/" + repo.path)}/.git; then mkdir --parents ${esa cfg.cachePath}/${esa repo.path}; - git clone ${esa repo.uri} ${esa cfg.cachePath}/${esa repo.path}; + git clone ${esa repo.uri} ${esa (cfg.cachePath + "/" + repo.path)}; out_paths=$(mktemp); - nix build ${esa cfg.cachePath}/${esa repo.path} --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths"; + nix build ${esa (cfg.cachePath + "/" + repo.path)} --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths"; [ "$(wc -l < "$out_paths")" -gt 1 ] && (echo "To many out-paths"; exit 1) out_path="$(cat "$out_paths")"; ln -s "$out_path" ${esa repo.path}; |