move nextcloud to container?
This commit is contained in:
18
flake.lock
generated
18
flake.lock
generated
@@ -1193,11 +1193,11 @@
|
|||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-mrfMvef+tOYMK35horTWF43tQpES1zI7hb5RbzN3oIk=",
|
"narHash": "sha256-mrfMvef+tOYMK35horTWF43tQpES1zI7hb5RbzN3oIk=",
|
||||||
"path": "/nix/store/7fxagr05n934b41j57qmd5mn8yy6v4qy-source/home-manager",
|
"path": "/nix/store/2iad54f45q80l7js354b3gjs8a9ywd2g-source/home-manager",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/7fxagr05n934b41j57qmd5mn8yy6v4qy-source/home-manager",
|
"path": "/nix/store/2iad54f45q80l7js354b3gjs8a9ywd2g-source/home-manager",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1807,11 +1807,11 @@
|
|||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-QahOuoQdXshu38W5uO7hLhG/yFkT7S2l8Dxicq0wdGk=",
|
"narHash": "sha256-QahOuoQdXshu38W5uO7hLhG/yFkT7S2l8Dxicq0wdGk=",
|
||||||
"path": "/nix/store/qrb62rpl26ilma2ff56kndycxvdvc2n4-source/programs",
|
"path": "/nix/store/ipps7wbs0429asc5w15xlbhyy74k1xmy-source/programs",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/qrb62rpl26ilma2ff56kndycxvdvc2n4-source/programs",
|
"path": "/nix/store/ipps7wbs0429asc5w15xlbhyy74k1xmy-source/programs",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1882,11 +1882,11 @@
|
|||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-0Ztx5DVQ2I7hvCK/qjGa4XTdRgbzM8rhf19m0al8lVM=",
|
"narHash": "sha256-0Ztx5DVQ2I7hvCK/qjGa4XTdRgbzM8rhf19m0al8lVM=",
|
||||||
"path": "/nix/store/qrb62rpl26ilma2ff56kndycxvdvc2n4-source/services/sddm",
|
"path": "/nix/store/ipps7wbs0429asc5w15xlbhyy74k1xmy-source/services/sddm",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/qrb62rpl26ilma2ff56kndycxvdvc2n4-source/services/sddm",
|
"path": "/nix/store/ipps7wbs0429asc5w15xlbhyy74k1xmy-source/services/sddm",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1976,12 +1976,12 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-T97lZQMAvMMOOFZBq/P9XdYnMKC98BRrFKSr2CFpTLI=",
|
"narHash": "sha256-cN8S1dX9UvYcLvw2DRKSY2NMhjwrPFA181sKCEJIrbQ=",
|
||||||
"path": "/nix/store/7fxagr05n934b41j57qmd5mn8yy6v4qy-source/system-config",
|
"path": "/nix/store/2iad54f45q80l7js354b3gjs8a9ywd2g-source/system-config",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/7fxagr05n934b41j57qmd5mn8yy6v4qy-source/system-config",
|
"path": "/nix/store/2iad54f45q80l7js354b3gjs8a9ywd2g-source/system-config",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -166,6 +166,8 @@
|
|||||||
"/var/log"
|
"/var/log"
|
||||||
"/var/lib/bluetooth"
|
"/var/lib/bluetooth"
|
||||||
"/var/lib/nixos"
|
"/var/lib/nixos"
|
||||||
|
"/var/lib/nixos-containers"
|
||||||
|
"/var/run/nixos-containers"
|
||||||
"/var/lib/systemd/coredump"
|
"/var/lib/systemd/coredump"
|
||||||
"/var/lib/docker"
|
"/var/lib/docker"
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
containers.gitlab = {
|
containers.gitlab = {
|
||||||
|
|
||||||
autoStart = true;
|
autoStart = false;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "192.168.100.10";
|
hostAddress = "192.168.100.10";
|
||||||
localAddress = "192.168.100.16";
|
localAddress = "192.168.100.16";
|
||||||
@@ -93,17 +93,12 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
#https = true;
|
#https = true;
|
||||||
#port = 443;
|
#port = 443;
|
||||||
#host = "localhost";
|
host = "gitlab.blunkall.us";
|
||||||
databasePasswordFile = "/etc/gitlab/dbpass";
|
databasePasswordFile = "/etc/gitlab/dbpass";
|
||||||
initialRootPasswordFile = "/etc/gitlab/rootpass";
|
initialRootPasswordFile = "/etc/gitlab/rootpass";
|
||||||
|
|
||||||
statePath = "/etc/gitlab/data";
|
statePath = "/etc/gitlab/data";
|
||||||
|
|
||||||
/*extraEnv = {
|
|
||||||
OIDC_CLIENT_ID = "";
|
|
||||||
OIDC_CLIENT_SECRET = "";
|
|
||||||
};*/
|
|
||||||
|
|
||||||
secrets = {
|
secrets = {
|
||||||
secretFile = "/etc/gitlab/secret";
|
secretFile = "/etc/gitlab/secret";
|
||||||
otpFile = "/etc/gitlab/otp";
|
otpFile = "/etc/gitlab/otp";
|
||||||
@@ -156,7 +151,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
localhost = {
|
"gitlab.blunkall.us" = {
|
||||||
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
|
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,20 +11,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.sysconfig.opts.virtualization.nextcloud.enable {
|
config = lib.mkIf config.sysconfig.opts.virtualization.nextcloud.enable {
|
||||||
|
|
||||||
/*mailserver = {
|
/*services.nginx.virtualHosts."localhost".listen = [ { addr = "0.0.0.0"; port = 8081; } ];
|
||||||
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.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud30;
|
package = pkgs.nextcloud30;
|
||||||
@@ -44,19 +31,19 @@
|
|||||||
extraAppsEnable = true;
|
extraAppsEnable = true;
|
||||||
settings = {
|
settings = {
|
||||||
overwriteprotocol = "https";
|
overwriteprotocol = "https";
|
||||||
trusted_domains = [ "nextcloud.blunkall.us" ];
|
trusted_domains = [ "nextcloud.blunkall.us" "dummy.blunkall.us" ];
|
||||||
trusted_proxies = [ "192.168.100.11" ];
|
trusted_proxies = [ "192.168.100.11" ];
|
||||||
default_phone_region = "US";
|
default_phone_region = "US";
|
||||||
};
|
};
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
};
|
};*/
|
||||||
|
|
||||||
/*containers.nextcloud = {
|
containers.nextcloud = {
|
||||||
|
|
||||||
autoStart = true;
|
autoStart = false;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "192.168.100.10";
|
hostAddress = "192.168.100.10";
|
||||||
localAddress = "192.168.100.16";
|
localAddress = "192.168.100.15";
|
||||||
|
|
||||||
bindMounts = {
|
bindMounts = {
|
||||||
|
|
||||||
@@ -64,22 +51,45 @@
|
|||||||
hostPath = "/ssd1/Nextcloud";
|
hostPath = "/ssd1/Nextcloud";
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"/etc/nextcloud-admin-pass" = {
|
||||||
|
hostPath = config.sops.secrets."nextcloud/pass".path;
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = { config, lib, pkgs, ... }: {
|
config = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
services.nginx.virtualHosts."192.168.100.16".listen = [ { addr = "0.0.0.0"; port = 80; } ];
|
services.nginx.virtualHosts."192.168.100.15".listen = [ { addr = "0.0.0.0"; port = 80; } ];
|
||||||
environment.etc."nextcloud-admin-pass".text = "//falconAdjacent42";
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud28;
|
package = pkgs.nextcloud30;
|
||||||
hostName = "192.168.100.16";
|
hostName = "localhost";
|
||||||
config.adminpassFile = "/etc/nextcloud-admin-pass";
|
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";
|
system.stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
};*/
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user