summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-07-03 21:31:43 +0200
committerSoispha <soispha@vhack.eu>2023-07-04 08:10:24 +0200
commit3c42c6bed8836e88f8f334ecfa09e42a2320f1bb (patch)
tree903ea83946fc3f41448b3b6d97799cfaab1d40f8 /system
parentFix(system/services/nginx/hosts): Inherit acmeRoot setting (diff)
downloadnixos-server-3c42c6bed8836e88f8f334ecfa09e42a2320f1bb.tar.gz
nixos-server-3c42c6bed8836e88f8f334ecfa09e42a2320f1bb.zip
Fix(system/services/nix-sync): Use correct shell escape for paths
Diffstat (limited to 'system')
-rw-r--r--system/services/nix-sync/default.nix8
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};