36 lines
803 B
Nix
36 lines
803 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
ncDomain = "${config.clan.core.vars.generators.nextcloud.files.subdomain.value}.${config.networking.fqdn}";
|
|
in
|
|
{
|
|
clan.core.vars.generators.nextcloud = {
|
|
files.subdomain.secret = false;
|
|
|
|
prompts = {
|
|
subdomain = {
|
|
persist = true;
|
|
type = "line";
|
|
description = "Sub-domain for Nextcloud app. Default:(cloud)";
|
|
};
|
|
};
|
|
|
|
script = ''cat $prompts/subdomain | echo -n "cloud" > $out/subdomain'';
|
|
};
|
|
|
|
services.nextcloud = {
|
|
hostName = ncDomain;
|
|
package = pkgs.nextcloud31;
|
|
|
|
settings = {
|
|
|
|
overwriteprotocol = "https";
|
|
trusted_domains = [ ];
|
|
trusted_proxies = [ ];
|
|
};
|
|
};
|
|
services.nginx.virtualHosts."${ncDomain}" = {
|
|
useACMEHost = "${config.networking.fqdn}";
|
|
forceSSL = true;
|
|
};
|
|
}
|