hosts/suwako: use 2 filehost services :wowo:

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-11-11 22:35:36 +05:30
parent 3e7e404d4c
commit 95825c6ff1
5 changed files with 376 additions and 546 deletions

View File

@@ -1,25 +1,39 @@
{
config,
lib,
pkgs,
inputs,
conf,
...
}:
{
systemd.services.filehost = {
enable = true;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
Environment = [
"TITLE=nattofiles"
"USER_URL=https://f.${conf.network.addresses.domain.natto}"
"ROCKET_LIMITS={file=\"512MB\",data-form=\"512MB\"}"
"ROCKET_LOG_LEVEL=debug"
"ROCKET_ADDRESS=0.0.0.0"
];
Restart = "on-failure";
ExecStart = "${inputs.filehost.packages.${pkgs.system}.simpler-filehost}/bin/simpler-filehost";
systemd.services = rec {
filehost = {
enable = true;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
Environment = [
"TITLE=nattofiles"
"INTERNAL_HOST=0.0.0.0"
"INTERNAL_PORT=8000"
"MAX_FILESIZE_MB=500"
"EXTERNAL_HAS_TLS=1"
"EXTERNAL_HOST=f.${conf.network.addresses.domain.natto}"
];
Restart = "on-failure";
ExecStart = "${inputs.filehost.packages.${pkgs.system}.yamaf}/bin/yamaf";
};
};
filehost-chutiya = lib.recursiveUpdate filehost {
serviceConfig.Environment = [
"TITLE=chutiyafiles"
"INTERNAL_HOST=0.0.0.0"
"INTERNAL_PORT=8001"
"MAX_FILESIZE_MB=500"
"EXTERNAL_HAS_TLS=1"
"EXTERNAL_HOST=f.${conf.network.addresses.domain.chutiya}"
];
};
};
};
}