feat(odin): added upfast, personal project.
This commit is contained in:
parent
e72e2d2ef5
commit
88b6ecdd15
4 changed files with 284 additions and 1 deletions
57
modules/servers/odin/upfast.nix
Normal file
57
modules/servers/odin/upfast.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{inputs, ...}: {
|
||||
fileSystems."/var/lib/upfast" = {
|
||||
device = "/root/10gb";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"loop"
|
||||
"rw"
|
||||
"usrquota"
|
||||
"grpquota"
|
||||
];
|
||||
};
|
||||
|
||||
users = {
|
||||
users.upfast = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/upfast";
|
||||
group = "upfast";
|
||||
};
|
||||
groups.upfast = {};
|
||||
};
|
||||
|
||||
systemd.services.upfast = {
|
||||
enable = true;
|
||||
description = "SelfHosted file upload and share service like 0x0.st";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "upfast";
|
||||
Group = "upfast";
|
||||
WorkingDirectory = "/var/lib/upfast";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
script = "${inputs.upfast.packages.aarch64-linux.default}/bin/upfast -p 8383 -d https://upfast.cronyakatsuki.xyz";
|
||||
|
||||
after = ["var-lib-upfast.mount"];
|
||||
bindsTo = ["var-lib-upfast.mount"];
|
||||
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.upfast.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:8383";
|
||||
}
|
||||
];
|
||||
|
||||
routers.upfast = {
|
||||
rule = "Host(`upfast.cronyakatsuki.xyz`)";
|
||||
tls = {
|
||||
certResolver = "porkbun";
|
||||
};
|
||||
service = "upfast";
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue