attic over rclone mount
This commit is contained in:
parent
ef88b3b991
commit
9614b9ac6d
4 changed files with 29 additions and 41 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -14,41 +15,28 @@
|
|||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/photos";
|
||||
ExecStart = "${pkgs.rclone}/bin/rclone mount --config ${
|
||||
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||
config.sops.secrets."rclone/config".path
|
||||
} --cache-dir /var/cache/rclone --transfers=32 --dir-cache-time 72h --vfs-cache-mode writes --vfs-cache-max-size 2G photos: /mnt/photos ";
|
||||
ExecStop = "${pkgs.fuse}/bin/fusermount -u /mnt/photos";
|
||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/photos";
|
||||
};
|
||||
};
|
||||
|
||||
# systemd.services.nextcloud-mount = {
|
||||
# enable = true;
|
||||
# description = "Mount the nextcloud data remote";
|
||||
# after = ["network-online.target"];
|
||||
# requires = ["network-online.target"];
|
||||
# wantedBy = ["default.target"];
|
||||
# serviceConfig = {
|
||||
# Type = "notify";
|
||||
# ExecStartPre = "/usr/bin/env mkdir -p /mnt/nextcloud";
|
||||
# ExecStart = "${pkgs.rclone}/bin/rclone mount --config /home/yt/.config/rclone/rclone.conf --uid 33 --gid 0 --allow-other --file-perms 0770 --dir-perms 0770 --transfers=32 rsyncnet:nextcloud /mnt/nextcloud";
|
||||
# ExecStop = "/bin/fusermount -u /mnt/nextcloud";
|
||||
# EnvironmentFile = config.sops.secrets."rclone/env".path;
|
||||
# };
|
||||
# };
|
||||
|
||||
# systemd.services.jellyfin-mount = {
|
||||
# enable = true;
|
||||
# description = "Mount the jellyfin data remote";
|
||||
# after = ["network-online.target"];
|
||||
# requires = ["network-online.target"];
|
||||
# requiredBy = ["jellyfin.service"];
|
||||
# serviceConfig = {
|
||||
# Type = "notify";
|
||||
# ExecStartPre = "/usr/bin/env mkdir -p /mnt/jellyfin";
|
||||
# ExecStart = "${pkgs.rclone}/bin/rclone mount --config /home/yt/.config/rclone/rclone.conf --allow-other --transfers=32 --dir-cache-time 72h --vfs-cache-mode writes --vfs-cache-max-size 2G jellyfin: /mnt/jellyfin";
|
||||
# ExecStop = "${pkgs.fuse}/bin/fusermount -u /mnt/jellyfin";
|
||||
# EnvironmentFile = config.sops.secrets."rclone/env".path;
|
||||
# };
|
||||
# };
|
||||
systemd.services.attic-mount = {
|
||||
enable = true;
|
||||
description = "Mount the attic data remote";
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
requiredBy = [ "atticd.service" ];
|
||||
before = [ "atticd.service" ];
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/attic";
|
||||
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||
config.sops.secrets."rclone/config".path
|
||||
} --cache-dir /var/cache/rclone --transfers=32 --allow-other rsyncnet:attic /mnt/attic ";
|
||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/photos";
|
||||
};
|
||||
};
|
||||
programs.fuse.userAllowOther = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue