summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 17:32:30 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 17:32:30 +0100
commit376ea264b252074bc53b356ac0da08392fe3045c (patch)
tree51494d5bc4ba6c5f2f8e3388d5b3e88b5884580c /hosts/vidhar/borg
parent50c65af8720d447f4156d6cf5b4a3ba395bdc679 (diff)
downloadnixos-376ea264b252074bc53b356ac0da08392fe3045c.tar
nixos-376ea264b252074bc53b356ac0da08392fe3045c.tar.gz
nixos-376ea264b252074bc53b356ac0da08392fe3045c.tar.bz2
nixos-376ea264b252074bc53b356ac0da08392fe3045c.tar.xz
nixos-376ea264b252074bc53b356ac0da08392fe3045c.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar/borg')
-rwxr-xr-xhosts/vidhar/borg/copy.py2
-rw-r--r--hosts/vidhar/borg/default.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 6adaa817..4e65968d 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -101,7 +101,7 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
101 for path in [chroot,upper,work]: 101 for path in [chroot,upper,work]:
102 path.mkdir() 102 path.mkdir()
103 subprocess.run(['mount', '-t', 'overlay', 'overlay', '-o', f'lowerdir=/,upperdir={upper},workdir={work}', chroot], check=True) 103 subprocess.run(['mount', '-t', 'overlay', 'overlay', '-o', f'lowerdir=/,upperdir={upper},workdir={work}', chroot], check=True)
104 bindMounts = ['nix', 'run', 'proc', 'dev', 'sys', pathlib.Path(os.path.expanduser('~')).relative_to('/')] 104 bindMounts = ['nix', 'run', 'run/secrets', 'var/lib/borg', 'proc', 'dev', 'sys', pathlib.Path(os.path.expanduser('~')).relative_to('/')]
105 if not ":" in src_repo_path: 105 if not ":" in src_repo_path:
106 bindMounts.append(pathlib.Path(src_repo_path).relative_to('/')) 106 bindMounts.append(pathlib.Path(src_repo_path).relative_to('/'))
107 if 'SSH_AUTH_SOCK' in os.environ: 107 if 'SSH_AUTH_SOCK' in os.environ:
diff --git a/hosts/vidhar/borg/default.nix b/hosts/vidhar/borg/default.nix
index 9201c925..7250c4c7 100644
--- a/hosts/vidhar/borg/default.nix
+++ b/hosts/vidhar/borg/default.nix
@@ -27,7 +27,7 @@ let
27 StateDirectory = "borg"; 27 StateDirectory = "borg";
28 RuntimeDirectory = "copy-borg"; 28 RuntimeDirectory = "copy-borg";
29 Environment = [ 29 Environment = [
30 "BORG_RSH=\"${pkgs.openssh}/bin/ssh -vv -F ${sshConfig}\"" 30 "BORG_RSH=\"${pkgs.openssh}/bin/ssh -F ${sshConfig}\""
31 "BORG_BASE_DIR=/var/lib/borg" 31 "BORG_BASE_DIR=/var/lib/borg"
32 "BORG_CONFIG_DIR=/var/lib/borg/config" 32 "BORG_CONFIG_DIR=/var/lib/borg/config"
33 "BORG_CACHE_DIR=/var/lib/borg/cache" 33 "BORG_CACHE_DIR=/var/lib/borg/cache"