bring back garage (#1)
make it work with my fork Reviewed-on: cy/infra#1
This commit is contained in:
parent
0dd68a7d25
commit
2bdfb3e1a2
8 changed files with 109 additions and 0 deletions
|
@ -38,5 +38,23 @@
|
|||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/attic";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.garage-mount = {
|
||||
enable = true;
|
||||
description = "Mount the garage data remote";
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
requiredBy = [ "garage.service" ];
|
||||
before = [ "garage.service" ];
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/garage";
|
||||
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||
config.sops.secrets."rclone/config".path
|
||||
} --cache-dir /var/cache/rclone --transfers=32 --checkers=32 --vfs-cache-mode writes --vfs-cache-max-size 5G --allow-other rsyncnet:garage /mnt/garage ";
|
||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fuse.userAllowOther = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue