finally fixing the ups, plus tons of formatting

This commit is contained in:
mjallen18
2024-08-23 12:00:51 -05:00
parent a8dfd2b7da
commit cd809e4156
59 changed files with 321 additions and 641 deletions

View File

@@ -35,89 +35,94 @@ in
};
};
config = { config, pkgs, lib, ... }: {
services = {
nextcloud = {
enable = true;
package = pkgs.nextcloud29;
datadir = "/data";
hostName = "localhost";
appstoreEnable = true;
caching.redis = true;
configureRedis = true;
config = {
adminuser = "mjallen";
adminpassFile = adminpass;
dbhost = "10.0.1.18:3306";
dbtype = "mysql";
dbname = "jallen_nextcloud";
dbuser = "nextcloud";
dbpassFile = dbpass;
config =
{ pkgs, lib, ... }:
{
services = {
nextcloud = {
enable = true;
package = pkgs.nextcloud29;
datadir = "/data";
hostName = "localhost";
appstoreEnable = true;
caching.redis = true;
configureRedis = true;
config = {
adminuser = "mjallen";
adminpassFile = adminpass;
dbhost = "10.0.1.18:3306";
dbtype = "mysql";
dbname = "jallen_nextcloud";
dbuser = "nextcloud";
dbpassFile = dbpass;
};
settings = {
trusted_domains = [
"10.0.1.18:9980"
"10.0.1.18:9943"
"cloud.mjallen.dev"
];
trusted_proxies = [ "10.0.1.18" ];
maintenance_window_start = 6;
default_phone_region = "US";
mail_from_address = "matt.l.jallen";
mail_smtpmode = "smtp";
mail_sendmailmode = "smtp";
mail_domain = "gmail.com";
mail_smtpauth = 1;
mail_smtpname = "matt.l.jallen";
mail_smtppassword = smtppassword;
mail_smtpsecure = "ssl";
mail_smtphost = "smtp.gmail.com";
mail_smtpport = 465;
enable_previews = true;
enabledPreviewProviders = [
"OC\\\\Preview\\\\PNG"
"OC\\\\Preview\\\\JPEG"
"OC\\\\Preview\\\\GIF"
"OC\\\\Preview\\\\BMP"
"OC\\\\Preview\\\\XBitmap"
"OC\\\\Preview\\\\MP3"
"OC\\\\Preview\\\\TXT"
"OC\\\\Preview\\\\MarkDown"
"OC\\\\Preview\\\\OpenDocument"
"OC\\\\Preview\\\\Krita"
"OC\\\\Preview\\\\HEIC"
];
};
};
settings = {
trusted_domains = [
"10.0.1.18:9980"
"10.0.1.18:9943"
"cloud.mjallen.dev"
];
trusted_proxies = [
"10.0.1.18"
];
maintenance_window_start = 6;
default_phone_region = "US";
mail_from_address = "matt.l.jallen";
mail_smtpmode = "smtp";
mail_sendmailmode = "smtp";
mail_domain = "gmail.com";
mail_smtpauth = 1;
mail_smtpname = "matt.l.jallen";
mail_smtppassword = smtppassword;
mail_smtpsecure = "ssl";
mail_smtphost = "smtp.gmail.com";
mail_smtpport = 465;
enable_previews = true;
enabledPreviewProviders = [
"OC\\\\Preview\\\\PNG"
"OC\\\\Preview\\\\JPEG"
"OC\\\\Preview\\\\GIF"
"OC\\\\Preview\\\\BMP"
"OC\\\\Preview\\\\XBitmap"
"OC\\\\Preview\\\\MP3"
"OC\\\\Preview\\\\TXT"
"OC\\\\Preview\\\\MarkDown"
"OC\\\\Preview\\\\OpenDocument"
"OC\\\\Preview\\\\Krita"
"OC\\\\Preview\\\\HEIC"
];
};
};
nginx = {
enable = true;
virtualHosts = {
"nextcloud-container.local" = {
# Change this to the desired port number
listen = [{ addr = "0.0.0.0"; port = 9943; }];
root = "/var/www/nextcloud";
# You may need to adjust other options for your specific setup
nginx = {
enable = true;
virtualHosts = {
"nextcloud-container.local" = {
# Change this to the desired port number
listen = [
{
addr = "0.0.0.0";
port = 9943;
}
];
root = "/var/www/nextcloud";
# You may need to adjust other options for your specific setup
};
};
};
};
};
system.stateVersion = "23.11";
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ 9943 ];
system.stateVersion = "23.11";
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ 9943 ];
};
# Use systemd-resolved inside the container
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
useHostResolvConf = lib.mkForce false;
};
# Use systemd-resolved inside the container
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
useHostResolvConf = lib.mkForce false;
};
services.resolved.enable = true;
services.resolved.enable = true;
};
};
};
}
}

View File

@@ -1,8 +1,4 @@
{
lib,
config,
...
}:
{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.nextcloud;