feat(faunus-ater): new seaweedfs-based media mount

This commit is contained in:
Malte Tammena 2024-02-13 22:31:45 +01:00
parent dcddbf4f04
commit 9983920234

View file

@ -55,6 +55,16 @@
"""
sleep_minutes = 720 # sleep 12h between each script execution
'';
# Link weed to mount.weed to expose it's mounting capabilities
seaweedfsPlusMount = pkgs.seaweedfs.overrideAttrs (old: {
runTests = false;
installPhase =
old.installPhase
+ ''
ln -s $out/bin/weed $out/bin/mount.weed
'';
});
in {
users.users.seaweed = {
isSystemUser = true;
@ -64,7 +74,7 @@ in {
# Helpful to have `weed shell` available
environment.systemPackages = [
pkgs.seaweedfs
seaweedfsPlusMount
];
systemd.tmpfiles.rules = [
@ -147,6 +157,18 @@ in {
};
};
systemd.mounts = [
{
what = "fuse";
where = "/data/media";
type = "weed";
options = "filer=localhost:8888,filer.path=/archive/media";
after = ["seaweedfs-filer.service"];
requires = ["seaweedfs-filer.service"];
wantedBy = ["multi-user.target"];
}
];
# Configure nginx reverse proxy
services.nginx.virtualHosts = {
"sea.tammena.me" = {