aboutsummaryrefslogtreecommitdiff
path: root/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configuration.nix')
-rw-r--r--configuration.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/configuration.nix b/configuration.nix
index c9fecd0..bb44c40 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -176,6 +176,7 @@ in
htop
links
git
+ rclone
docker
docker-compose
];
@@ -243,6 +244,24 @@ in
];
};
+ # Mount Garage using Rclone
+ systemd.services.mountgarage = {
+ enable = true;
+ description = "Mount the Garage data store";
+ path = [
+ pkgs.fuse
+ pkgs.rclone
+ ];
+ unitConfig = {
+ Type = "simple";
+ };
+ serviceConfig = {
+ ExecStartPre = "${pkgs.bash}/bin/sh -c \"mkdir -p /mnt/garage-staging; fusermount -u /mnt/garage-staging || exit 0\"";
+ ExecStart = "${pkgs.rclone}/bin/rclone --config /root/rclone.conf mount --vfs-cache-mode full --vfs-cache-max-size 1G --cache-dir /root/mountgarage-cache staging: /mnt/garage-staging";
+ };
+ wantedBy = [ "multi-user.target" ];
+ };
+
# Open ports in the firewall.
networking.firewall = {
enable = true;