attic over rclone mount
This commit is contained in:
parent
ef88b3b991
commit
9614b9ac6d
4 changed files with 29 additions and 41 deletions
|
@ -16,8 +16,7 @@
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bottom
|
|
||||||
btop
|
|
||||||
foot.terminfo
|
foot.terminfo
|
||||||
|
attic-server
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
man-pages-posix
|
man-pages-posix
|
||||||
man
|
man
|
||||||
man-db
|
man-db
|
||||||
|
attic-client
|
||||||
|
bottom
|
||||||
|
btop
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zoxide.options = [ "--cmd cd" ];
|
programs.zoxide.options = [ "--cmd cd" ];
|
||||||
|
|
|
@ -14,17 +14,15 @@
|
||||||
database.url = "postgresql:///atticd?host=/run/postgresql";
|
database.url = "postgresql:///atticd?host=/run/postgresql";
|
||||||
|
|
||||||
storage = {
|
storage = {
|
||||||
type = "s3";
|
type = "local";
|
||||||
region = "auto";
|
path = "/mnt/attic";
|
||||||
bucket = "cy7";
|
|
||||||
endpoint = "https://e3e97aac307d106a7becea43cef8fcbd.r2.cloudflarestorage.com";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
chunking = {
|
chunking = {
|
||||||
nar-size-threshold = 64 * 1024; # 64 KiB
|
nar-size-threshold = 128 * 1024 * 1024;
|
||||||
min-size = 16 * 1024; # 16 KiB
|
min-size = 64 * 1024 * 1024;
|
||||||
avg-size = 64 * 1024; # 64 KiB
|
avg-size = 128 * 1024 * 1024;
|
||||||
max-size = 256 * 1024; # 256 KiB
|
max-size = 256 * 1024 * 1024;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -14,41 +15,28 @@
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/photos";
|
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
|
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 ";
|
} --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 = {
|
systemd.services.attic-mount = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# description = "Mount the nextcloud data remote";
|
description = "Mount the attic data remote";
|
||||||
# after = ["network-online.target"];
|
requires = [ "network-online.target" ];
|
||||||
# requires = ["network-online.target"];
|
after = [ "network-online.target" ];
|
||||||
# wantedBy = ["default.target"];
|
requiredBy = [ "atticd.service" ];
|
||||||
# serviceConfig = {
|
before = [ "atticd.service" ];
|
||||||
# Type = "notify";
|
serviceConfig = {
|
||||||
# ExecStartPre = "/usr/bin/env mkdir -p /mnt/nextcloud";
|
Type = "notify";
|
||||||
# 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";
|
ExecStartPre = "/usr/bin/env mkdir -p /mnt/attic";
|
||||||
# ExecStop = "/bin/fusermount -u /mnt/nextcloud";
|
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||||
# EnvironmentFile = config.sops.secrets."rclone/env".path;
|
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";
|
||||||
|
};
|
||||||
# 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;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
programs.fuse.userAllowOther = true;
|
programs.fuse.userAllowOther = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue