nixos-config/hosts/chunk/rclone.nix

55 lines
2.2 KiB
Nix
Raw Normal View History

{
pkgs,
config,
...
2024-12-19 02:32:58 -05:00
}:
{
2024-12-15 02:44:50 -05:00
systemd.services.immich-mount = {
enable = true;
description = "Mount the immich data remote";
2024-12-19 02:32:58 -05:00
requires = [ "network-online.target" ];
2024-12-31 11:13:30 -05:00
after = [ "network-online.target" ];
2024-12-19 02:32:58 -05:00
requiredBy = [ "podman-immich-server.service" ];
2024-12-25 01:46:00 -05:00
before = [ "podman-immich-server.service" ];
2024-12-15 02:44:50 -05:00
serviceConfig = {
Type = "notify";
ExecStartPre = "/usr/bin/env mkdir -p /mnt/photos";
2024-12-26 23:40:33 -05:00
ExecStart = "${pkgs.rclone}/bin/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 ";
2024-12-17 18:12:22 -05:00
ExecStop = "${pkgs.fuse}/bin/fusermount -u /mnt/photos";
2024-12-15 02:44:50 -05:00
};
};
# 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;
# };
# };
2024-12-19 02:32:58 -05:00
# 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;
# };
# };
2024-12-15 02:44:50 -05:00
programs.fuse.userAllowOther = true;
}