summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-18 12:27:13 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-18 12:27:13 +0100
commit65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce (patch)
tree45c609b4c62c207a62338f394a115d5b36060d07 /hosts/vidhar/borg
parent6b21fa7f2721c2db59c6ade2bd730f21bec29b79 (diff)
downloadnixos-65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce.tar
nixos-65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce.tar.gz
nixos-65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce.tar.bz2
nixos-65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce.tar.xz
nixos-65b93ec8b7c935bc1beb11a9b4e2b852c7df11ce.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 36798dc6..be890cf1 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -115,7 +115,7 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
115 for path in [chroot,upper,work]: 115 for path in [chroot,upper,work]:
116 path.mkdir() 116 path.mkdir()
117 subprocess.run(['mount', '-t', 'overlay', 'overlay', '-o', f'lowerdir=/,upperdir={upper},workdir={work}', chroot], check=True) 117 subprocess.run(['mount', '-t', 'overlay', 'overlay', '-o', f'lowerdir=/,upperdir={upper},workdir={work}', chroot], check=True)
118 bindMounts = ['nix', 'run', 'run/secrets.d', 'proc', 'dev', 'sys', pathlib.Path(os.path.expanduser('~')).relative_to('/')] 118 bindMounts = ['nix', 'run', 'run/secrets.d', 'run/wrappers', 'proc', 'dev', 'sys', pathlib.Path(os.path.expanduser('~')).relative_to('/')]
119 if os.environ.get('BORG_BASE_DIR'): 119 if os.environ.get('BORG_BASE_DIR'):
120 bindMounts.append(pathlib.Path(os.environ['BORG_BASE_DIR']).relative_to('/')) 120 bindMounts.append(pathlib.Path(os.environ['BORG_BASE_DIR']).relative_to('/'))
121 if not ":" in src_repo_path: 121 if not ":" in src_repo_path:
diff --git a/hosts/vidhar/borg/default.nix b/hosts/vidhar/borg/default.nix
index de6a0854..1f9936ce 100644
--- a/hosts/vidhar/borg/default.nix
+++ b/hosts/vidhar/borg/default.nix
@@ -68,7 +68,7 @@ let
68 copy 68 copy
69 69
70 wrapProgram $out/bin/copy \ 70 wrapProgram $out/bin/copy \
71 --prefix PATH : ${makeBinPath (with pkgs; [fuse utillinux borgbackup])} 71 --prefix PATH : ${makeBinPath (with pkgs; [utillinux borgbackup])}:${config.security.wrapperDir}
72 ''; 72 '';
73 }); 73 });
74in { 74in {