Add WebDAV server

This commit is contained in:
Evie Litherland-Smith 2025-01-17 11:46:00 +00:00
parent 4b5dc42e87
commit 698985a967
3 changed files with 35 additions and 12 deletions

View file

@ -9,6 +9,7 @@
./services/nix-serve.nix
./services/sshd.nix
./services/syncthing.nix
./services/webdav.nix
./services/xandikos.nix
# ./services/minecraft.nix
# ./services/satisfactory/default.nix

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, ... }:
{
imports = [ ./caddy.nix ];
services = {
@ -23,16 +23,10 @@
};
};
};
# gitea-actions-runner = {
# package = pkgs.forgejo-runner;
# instances.default = {
# enable = true;
# name = "monolith";
# url = config.services.forgejo.settings.server.ROOT_URL;
# tokenFile = /var/lib/forgejo/runner_registration_token;
# labels = ["native:host"];
# };
# };
caddy.virtualHosts."git.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:3100";
caddy.virtualHosts."git.xenia.me.uk".extraConfig =
let
port = config.services.forgejo.settings.server.HTTP_PORT;
in
"reverse_proxy http://localhost:${toString port}";
};
}

View file

@ -0,0 +1,28 @@
{ config, ... }:
{
imports = [ ./caddy.nix ];
services = {
webdav = {
enable = true;
settings = {
address = "0.0.0.0";
port = 6065;
debug = true;
behindProxy = true;
directory = "/srv/webdav";
users = [
{
username = "pixelifytica";
password = "{bcrypt}$2b$12$ulThbG9JGJP/FYI4RyX8sufMOE/vfw928gJMFedajiINbqx585wY.";
permissions = "CRUD";
}
];
};
};
caddy.virtualHosts."files.xenia.me.uk".extraConfig =
let
inherit (config.services.webdav.settings) port;
in
"reverse_proxy http://localhost:${toString port}";
};
}