Add back nextcloud and try collabora
This commit is contained in:
parent
38bb03a054
commit
8a1f1cce31
Binary file not shown.
|
@ -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
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./nfs
|
|
||||||
./samba
|
|
||||||
./seafile
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
services.collabora-online = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
32
modules/system/services/server/nextcloud/default.nix
Normal file
32
modules/system/services/server/nextcloud/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
modules/system/services/server/nextcloud/nginx/default.nix
Normal file
18
modules/system/services/server/nextcloud/nginx/default.nix
Normal 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;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue