diff options
author | Soispha <soispha@vhack.eu> | 2023-07-03 21:31:43 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-04 08:10:24 +0200 |
commit | 3c42c6bed8836e88f8f334ecfa09e42a2320f1bb (patch) | |
tree | 903ea83946fc3f41448b3b6d97799cfaab1d40f8 | |
parent | Fix(system/services/nginx/hosts): Inherit acmeRoot setting (diff) | |
download | nixos-server-3c42c6bed8836e88f8f334ecfa09e42a2320f1bb.tar.gz nixos-server-3c42c6bed8836e88f8f334ecfa09e42a2320f1bb.zip |
Fix(system/services/nix-sync): Use correct shell escape for paths
-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}; |