run media off of sshfs for continuwuity

This commit is contained in:
Henry Hiles 2026-09-23 15:43:48 -04:00
commit 1aadf2a468
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -1,11 +1,14 @@
{ lib, pkgs, ... }: { { lib, pkgs, ... }: {
systemd.services.continuwuity.serviceConfig = { systemd.services.continuwuity = {
unitConfig.RequiresMountsFor = [ "/var/lib/private/continuwuity/media" ];
serviceConfig = {
MemoryMax = "5.5G"; MemoryMax = "5.5G";
MemorySwapMax = "4.5G"; MemorySwapMax = "4.5G";
TimeoutStartSec = "10m"; TimeoutStartSec = "10m";
Restart = lib.mkForce "always"; Restart = lib.mkForce "always";
ExecStartPost = "/bin/sh -c 'until ${lib.getExe pkgs.curl} -s -f https://matrix.federated.nexus/.well-known/matrix/client; do sleep 1; done'"; ExecStartPost = "/bin/sh -c 'until ${lib.getExe pkgs.curl} -s -f https://matrix.federated.nexus/.well-known/matrix/client; do sleep 1; done'";
}; };
};
quad.matrix = rec { quad.matrix = rec {
enable = true; enable = true;
@ -27,4 +30,23 @@
}; };
}; };
}; };
system.fsPackages = [
pkgs.sshfs
];
systemd.mounts = [
{
what = "u675579@u675579.your-storagebox.de:/media";
where = "/var/lib/private/continuwuity/media";
type = "fuse.sshfs";
options = builtins.concatStringsSep "," [
"_netdev"
"ServerAliveInterval=15"
"ServerAliveCountMax=3"
"IdentityFile=/home/quadradical/.ssh/id_ed25519"
"allow_other"
];
}
];
} }