nextcloud
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
imports = [
|
||||
./gitlab
|
||||
./traefik
|
||||
# ./authentik-nix
|
||||
./authentik
|
||||
./nginx
|
||||
./jellyfin
|
||||
./pihole
|
||||
./nextcloud
|
||||
];
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.";
|
||||
localAddress = "192.168.100.16";
|
||||
bindMounts = {
|
||||
"/etc/gitlab/data" = {
|
||||
hostPath = "/ssd1/Gitlab/data";
|
||||
|
||||
52
system-config/services/containers/nextcloud/default.nix
Normal file
52
system-config/services/containers/nextcloud/default.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.opts.virtualization.nextcloud.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.opts.virtualization.nextcloud.enable {
|
||||
|
||||
sops.templates."nextcloud_pass.txt" = {
|
||||
content = ''
|
||||
${config.sops.placeholder."nextcloud/pass"}
|
||||
'';
|
||||
|
||||
path = "/ssd1/Nextcloud/nextcloud_pass.txt";
|
||||
};
|
||||
|
||||
containers.nextcloud = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.16";
|
||||
|
||||
bindMounts = {
|
||||
|
||||
"/var/lib/nextcloud" = {
|
||||
hostPath = "/ssd1/Nextcloud";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
services.nextcloud = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "localhost";
|
||||
config.adminPassFile = "/var/lib/nextcloud/nextcloud_pass.txt";
|
||||
dataDir = "/var/lib/nextcloud/data";
|
||||
home = "/var/lib/nextcloud/nextcloud_home";
|
||||
https = true;
|
||||
maxUploadSize = "5G";
|
||||
settings = {
|
||||
overwriteprotocol = "https";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -25,61 +25,5 @@
|
||||
${pkgs.docker-compose}/bin/docker-compose up
|
||||
'';
|
||||
};
|
||||
|
||||
containers.unbound = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.15";
|
||||
|
||||
config = {
|
||||
|
||||
services.unbound = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
interface = [ "127.0.0.1" ];
|
||||
|
||||
port = 5335;
|
||||
|
||||
do-ipv4 = "yes";
|
||||
|
||||
do-udp = "yes";
|
||||
|
||||
do-tcp = "yes";
|
||||
|
||||
do-ipv6 = "no";
|
||||
|
||||
perfer-ipv6 = "no";
|
||||
|
||||
harden-glue = "yes";
|
||||
|
||||
harden-dnssec-stripped = "yes";
|
||||
|
||||
use-caps-for-id = "no";
|
||||
|
||||
edns-buffer-size = 1232;
|
||||
|
||||
prefetch = "yes";
|
||||
|
||||
num-threads = 1;
|
||||
|
||||
so-rcvbuf = "1m";
|
||||
|
||||
private-address = [
|
||||
"192.168.0.0/16"
|
||||
"169.254.0.0/16"
|
||||
"172.16.0.0/12"
|
||||
"10.0.0.0/8"
|
||||
"fd00::/8"
|
||||
"fe80::/10"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
serversTransport.insecureSkipVerify = true;
|
||||
api = {
|
||||
dashboard = true;
|
||||
insecure = true;
|
||||
debug = true;
|
||||
};
|
||||
global = {
|
||||
@@ -91,7 +90,7 @@
|
||||
certResolver = "cloudflare";
|
||||
domains = {
|
||||
main = "blunkall.us";
|
||||
sans = [ "*.blunkall.us" "blunkall.us" ];
|
||||
sans = [ "*.local.blunkall.us" "*.blunkall.us" "blunkall.us" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -132,68 +131,45 @@
|
||||
middlewares = [
|
||||
"authentik"
|
||||
];
|
||||
/*tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = {
|
||||
main = "blunkall.us";
|
||||
sans = [ "*.blunkall.us" ];
|
||||
};
|
||||
};*/
|
||||
};
|
||||
jellyfin = {
|
||||
entryPoints = [ "localsecure" "websecure" ];
|
||||
rule = "Host(`jellyfin.blunkall.us`)";
|
||||
service = "jellyfin";
|
||||
/*middlewares = [
|
||||
"authentik"
|
||||
];*/
|
||||
/*tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = {
|
||||
main = "blunkall.us";
|
||||
sans = [ "*.blunkall.us" ];
|
||||
};
|
||||
};*/
|
||||
};
|
||||
|
||||
auth = {
|
||||
entryPoints = [ "localsecure" "websecure" ];
|
||||
rule = "Host(`auth.blunkall.us`)";
|
||||
service = "authentik";
|
||||
/*tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = {
|
||||
main = "blunkall.us";
|
||||
sans = [ "*.blunkall.us" ];
|
||||
};
|
||||
};*/
|
||||
};
|
||||
|
||||
/*gitlab = {
|
||||
entryPoints = [ "localsecure" "websecure" ];
|
||||
rule = "Host(`gitlab.blunkall.us`)";
|
||||
service = "gitlab";
|
||||
tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = {
|
||||
main = "blunkall.us";
|
||||
sans = [ "*.blunkall.us" "*.local.blunkall.us" ];
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
/*local = {
|
||||
nextcloud = {
|
||||
entryPoints = [ "localsecure" "websecure" ];
|
||||
rule = "Host(`nextcloud.blunkall.us`)";
|
||||
service = "nextcloud";
|
||||
middlewares = [
|
||||
"nextcloud_redirectregex"
|
||||
];
|
||||
};
|
||||
|
||||
traefik = {
|
||||
entryPoints = [ "localsecure" ];
|
||||
rule = "Host(`traefik.local.blunkall.us`)";
|
||||
service = "dashboard@internal";
|
||||
tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = {
|
||||
main = "blunkall.us";
|
||||
sans = [ "*.blunkall.us" "*.local.blunkall.us" ];
|
||||
};
|
||||
};
|
||||
};*/
|
||||
service = "api@internal";
|
||||
};
|
||||
|
||||
pihole = {
|
||||
entryPoints = [ "localsecure" ];
|
||||
rule = "Host(`pihole.local.blunkall.us`)";
|
||||
service = "pihole";
|
||||
};
|
||||
};
|
||||
|
||||
middlewares = {
|
||||
@@ -214,6 +190,12 @@
|
||||
"X-authentik-meta-version"
|
||||
];
|
||||
};
|
||||
|
||||
nextcloud_redirectregex.redirectregex = {
|
||||
permanent = true;
|
||||
regex = "https://(.*)/.well-known/(?:card|cal)dav";
|
||||
replacement = "https://$${1}/remote.php/dav";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
@@ -224,12 +206,16 @@
|
||||
jellyfin.loadBalancer.servers = [ { url = "http://192.168.100.14:8096"; } ];
|
||||
|
||||
authentik.loadBalancer.servers = [ { url = "http://192.168.100.10:9000"; } ];
|
||||
|
||||
pihole.loadBalancer.servers = [ { url = "http://192.168.100.10:8080"; } ];
|
||||
|
||||
nextcloud.loadBalancer.servers = [ { url = "http://192.168.100.16:80"; } ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 9080 9443 8080 ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 9080 9443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 80 443 ];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
Reference in New Issue
Block a user