hippocampus: Webdav instance
This commit is contained in:
28
machines/hippocampus/servers/public/webdav.nix
Normal file
28
machines/hippocampus/servers/public/webdav.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
sops.secrets.webdav = {
|
||||
owner = config.services.webdav.user;
|
||||
};
|
||||
services.webdav = {
|
||||
enable = true;
|
||||
settings = {
|
||||
address = "0.0.0.0";
|
||||
port = 7350;
|
||||
scope = "/srv/webdav";
|
||||
modify = true;
|
||||
auth = true;
|
||||
users = [{
|
||||
username = "{env}ORG_MOBILE_USER";
|
||||
password = "{env}ORG_MOBILE_PASS";
|
||||
}];
|
||||
};
|
||||
environmentFile = config.sops.secrets.webdav.path;
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts = {
|
||||
"webdav.syzygial.cc" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:${toString config.services.webdav.settings.port}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user