rework nextcloud service
This commit is contained in:
35
machines/b4l/services/nextcloud.nix
Normal file
35
machines/b4l/services/nextcloud.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ 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;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user