86 lines
2.7 KiB
Nix
86 lines
2.7 KiB
Nix
{ config, lib, pkgs, inputs, ... }: {
|
|
|
|
options.sysconfig.opts.virtualization.nextcloud.enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
|
|
imports = [
|
|
inputs.simple-nixos-mailserver.nixosModule
|
|
];
|
|
|
|
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.nextcloud = {
|
|
enable = true;
|
|
package = pkgs.nextcloud30;
|
|
hostName = "localhost";
|
|
config = {
|
|
adminpassFile = config.sops.secrets."nextcloud/pass".path;
|
|
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" ];
|
|
trusted_proxies = [ "192.168.100.11" ];
|
|
default_phone_region = "US";
|
|
};
|
|
database.createLocally = true;
|
|
};
|
|
|
|
/*containers.nextcloud = {
|
|
|
|
autoStart = true;
|
|
privateNetwork = true;
|
|
hostAddress = "192.168.100.10";
|
|
localAddress = "192.168.100.16";
|
|
|
|
bindMounts = {
|
|
|
|
"/etc/nextcloud" = {
|
|
hostPath = "/ssd1/Nextcloud";
|
|
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.nextcloud = {
|
|
enable = true;
|
|
package = pkgs.nextcloud28;
|
|
hostName = "192.168.100.16";
|
|
config.adminpassFile = "/etc/nextcloud-admin-pass";
|
|
};
|
|
|
|
system.stateVersion = "23.05";
|
|
};
|
|
};*/
|
|
};
|
|
}
|