Add back nextcloud and try collabora

This commit is contained in:
Jimbo 2025-01-07 13:35:36 -05:00
parent 38bb03a054
commit 8a1f1cce31
11 changed files with 59 additions and 65 deletions

Binary file not shown.

View file

@ -3,12 +3,13 @@
imports = [ imports = [
./acme ./acme
./ddclient ./ddclient
./fileserver
./forgejo ./forgejo
./icecast ./icecast
./mailserver ./mailserver
./minecraft ./minecraft
./mysql ./mysql
./nextcloud
./nfs
./nginx ./nginx
./social ./social
./transmission ./transmission

View file

@ -1,8 +0,0 @@
{ ... }:
{
imports = [
./nfs
./samba
./seafile
];
}

View file

@ -1,26 +0,0 @@
{ config, lib, ... }:
{
services = lib.mkIf config.system.server.enable {
samba = {
enable = true;
openFirewall = true;
settings = {
global = {
"workgroup" = "WORKGROUP";
"server string" = "NixSMB";
"security" = "user";
"hosts allow" = "${config.ips.localSpan}. 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
};
};
};
# Advertise to Windows
samba-wsdd = {
enable = true;
openFirewall = true;
};
};
}

View file

@ -1,12 +0,0 @@
{ config, ... }:
{
imports = [ ./nginx ];
services.seafile = {
enable = config.system.server.enable;
adminEmail = "jimbo@${config.domains.p2}";
initialAdminPassword = config.secrets.mainAccPass;
ccnetSettings.General.SERVICE_URL = "https://sync.${config.domains.p2}";
seafileSettings.fileserver.host = "unix:/run/seafile/server.sock";
};
}

View file

@ -1,17 +0,0 @@
{ lib, config, ... }:
{
services.nginx.virtualHosts."sync.${config.domains.p2}" = lib.mkIf config.services.seafile.enable {
enableACME = true;
forceSSL = true;
locations = {
"/" = {
proxyPass = "http://unix:/run/seahub/gunicorn.sock";
proxyWebsockets = true;
};
"/seafhttp" = {
proxyPass = "http://unix:/run/seafile/server.sock";
proxyWebsockets = true;
};
};
};
}

View file

@ -0,0 +1,6 @@
{ config, lib, ... }:
{
services.collabora-online = {
enable = true;
};
}

View file

@ -0,0 +1,32 @@
{ pkgs, config, ... }:
{
imports = [
./collabora
./nginx
];
services.nextcloud = {
enable = config.system.server.enable;
package = pkgs.nextcloud30;
hostName = "cloud.${config.domains.p2}";
datadir = "/mnt/nextcloud";
https = true;
config = {
adminuser = config.sysusers.main;
adminpassFile = "${pkgs.writeText "initial" config.secrets.initialPass}";
};
settings = {
trusted_proxies = [ "127.0.0.1" ];
trusted_domains = [ "cloud.${config.domains.p2}" ];
overwriteprotocol = "https";
mail_smtphost = "mx.${config.domains.p1}";
mail_domain = "${config.domains.p1}";
mail_from_address = "noreply";
mail_smtpauth = "true";
mail_smtpname = "noreply@${config.domains.p2}";
mail_smtppassword = config.secrets.noreplyPassword;
mail_smtpmode = "smtp";
mail_smtpport = 587;
};
};
}

View file

@ -0,0 +1,18 @@
{ lib, config, ... }:
{
services.nginx.virtualHosts."cloud.${config.domains.p2}" = lib.mkIf config.services.nextcloud.enable {
enableACME = true;
addSSL = true;
locations."/" = {
proxyWebsockets = true;
extraConfig = ''
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
'';
};
};
}

View file

@ -3,6 +3,6 @@
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 1w"; options = "--delete-older-than 7d";
}; };
} }