move nextcloud to container?

This commit is contained in:
2024-11-17 23:22:40 -06:00
parent c02d044ec0
commit 359bc6769d
4 changed files with 49 additions and 42 deletions

View File

@@ -34,7 +34,7 @@
containers.gitlab = {
autoStart = true;
autoStart = false;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.16";
@@ -93,17 +93,12 @@
enable = true;
#https = true;
#port = 443;
#host = "localhost";
host = "gitlab.blunkall.us";
databasePasswordFile = "/etc/gitlab/dbpass";
initialRootPasswordFile = "/etc/gitlab/rootpass";
statePath = "/etc/gitlab/data";
/*extraEnv = {
OIDC_CLIENT_ID = "";
OIDC_CLIENT_SECRET = "";
};*/
secrets = {
secretFile = "/etc/gitlab/secret";
otpFile = "/etc/gitlab/otp";
@@ -156,7 +151,7 @@
enable = true;
recommendedProxySettings = true;
virtualHosts = {
localhost = {
"gitlab.blunkall.us" = {
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
};
};

View File

@@ -11,20 +11,7 @@
config = lib.mkIf config.sysconfig.opts.virtualization.nextcloud.enable {
/*mailserver = {
enable = true;
fqdn = "mail.blunkall.com";
domains = [ "blunkall.us" ];
loginAccounts = {
"user1@blunkall.us" = {
hashedPasswordFile = "";
};
};
};*/
services.nginx.virtualHosts."localhost".listen = [ { addr = "0.0.0.0"; port = 8081; } ];
/*services.nginx.virtualHosts."localhost".listen = [ { addr = "0.0.0.0"; port = 8081; } ];
services.nextcloud = {
enable = true;
package = pkgs.nextcloud30;
@@ -44,19 +31,19 @@
extraAppsEnable = true;
settings = {
overwriteprotocol = "https";
trusted_domains = [ "nextcloud.blunkall.us" ];
trusted_domains = [ "nextcloud.blunkall.us" "dummy.blunkall.us" ];
trusted_proxies = [ "192.168.100.11" ];
default_phone_region = "US";
};
database.createLocally = true;
};
};*/
/*containers.nextcloud = {
containers.nextcloud = {
autoStart = true;
autoStart = false;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.16";
localAddress = "192.168.100.15";
bindMounts = {
@@ -64,22 +51,45 @@
hostPath = "/ssd1/Nextcloud";
isReadOnly = false;
};
"/etc/nextcloud-admin-pass" = {
hostPath = config.sops.secrets."nextcloud/pass".path;
isReadOnly = false;
};
};
config = { config, lib, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx.virtualHosts."192.168.100.16".listen = [ { addr = "0.0.0.0"; port = 80; } ];
environment.etc."nextcloud-admin-pass".text = "//falconAdjacent42";
services.nginx.virtualHosts."192.168.100.15".listen = [ { addr = "0.0.0.0"; port = 80; } ];
services.nextcloud = {
enable = true;
package = pkgs.nextcloud28;
hostName = "192.168.100.16";
config.adminpassFile = "/etc/nextcloud-admin-pass";
package = pkgs.nextcloud30;
hostName = "localhost";
config = {
adminpassFile = "/etc/nextcloud-admin-pass";
adminuser = "root";
dbtype = "mysql";
};
https = true;
datadir = "/ssd1/Nextcloud/data";
home = "/ssd1/Nextcloud/nextcloud_home";
appstoreEnable = true;
extraApps = with config.services.nextcloud.package.packages.apps; {
inherit mail contacts calendar tasks user_oidc;
};
extraAppsEnable = true;
settings = {
overwriteprotocol = "https";
trusted_domains = [ "nextcloud.blunkall.us" "dummy.blunkall.us" ];
trusted_proxies = [ "192.168.100.11" ];
default_phone_region = "US";
};
database.createLocally = true;
};
system.stateVersion = "23.05";
};
};*/
};
};
}