Add dufs for webdav shares

This commit is contained in:
Tyler Starr 2023-11-09 15:44:24 -08:00
parent 3db1173f4a
commit be04a00cf5
5 changed files with 52 additions and 22 deletions

View File

@ -5,6 +5,8 @@
./wireguard-server.nix ./wireguard-server.nix
./samba-server.nix ./samba-server.nix
./syncthing.nix ./syncthing.nix
./obsidian-vault.nix
./share.nix
]; ];
nix = { nix = {
@ -114,17 +116,21 @@
"rss.tstarr.us" = (SSL // { "rss.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://localhost:8081/"; locations."/".proxyPass = "http://localhost:8081/";
}); });
"wiki.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://localhost:8082/";
});
"rssbridge.tstarr.us" = (SSL // { "rssbridge.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://localhost:3000/"; locations."/".proxyPass = "http://localhost:3000/";
}); });
"media.tstarr.us" = (SSL // { "media.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://localhost:8096/"; locations."/".proxyPass = "http://localhost:8096/";
}); });
"wiki.tstarr.us" = (SSL // { "vault.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://localhost:4567/"; locations."/".proxyPass = "http://localhost:5000/";
extraConfig = ''
auth_pam "Password Required";
auth_pam_service_name "nginx";
'';
});
"share.tstarr.us" = (SSL // {
locations."/".proxyPass = "http://localhost:5001/";
extraConfig = '' extraConfig = ''
auth_pam "Password Required"; auth_pam "Password Required";
auth_pam_service_name "nginx"; auth_pam_service_name "nginx";
@ -140,7 +146,6 @@
}; };
services = { services = {
jellyfin.enable = true; jellyfin.enable = true;
seafile-server.enable = true;
}; };
system = { system = {
terminal.enable = true; terminal.enable = true;

View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, user, ... }:
{
networking.firewall.allowedTCPPorts = [ 5000 ];
networking.firewall.allowedUDPPorts = [ 5000 ];
environment.systemPackages = with pkgs; [ dufs ];
systemd.services.obsidian-vault = {
description = "Start dufs containing obsidian vault (vulcan)";
wantedBy = [ "default.target" ];
restartIfChanged = true;
serviceConfig = {
Type = "simple";
Restart = "always";
ExecStart = "${pkgs.dufs}/bin/dufs -p 5000 -A /engi/apps/dufs/vault";
};
};
}

View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, user, ... }:
{
networking.firewall.allowedTCPPorts = [ 5001 ];
networking.firewall.allowedUDPPorts = [ 5001 ];
environment.systemPackages = with pkgs; [ dufs ];
systemd.services.share = {
description = "Start dufs for quick sharing of files";
wantedBy = [ "default.target" ];
restartIfChanged = true;
serviceConfig = {
Type = "simple";
Restart = "always";
ExecStart = "${pkgs.dufs}/bin/dufs -p 5001 -A /engi/apps/dufs/share";
};
};
}

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./seafile-server.nix ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ./peripherals.nix ]; imports = [ ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ./peripherals.nix ];
} }

View File

@ -1,15 +0,0 @@
{ config, lib, pkgs, pkgs-unstable, user, ... }:
let
cfg = config.modules.services.seafile-server;
in {
options.modules.services.seafile-server.enable = lib.mkEnableOption "seafile-server";
config = lib.mkIf cfg.enable {
services.seafile = {
enable = true;
adminEmail = "starrtyler88@gmail.com";
initialAdminPassword = "dude";
ccnetSettings.General.SERVICE_URL = "https://wiki.tstarr.us";
};
};
}