feat: simplified the config for running services, only one hosts config is required now in each server config file
This commit is contained in:
parent
f8c7860eb5
commit
379cb84839
34 changed files with 200 additions and 581 deletions
|
@ -18,16 +18,6 @@ in {
|
|||
options.services.skynet."${name}" = {
|
||||
enable = mkEnableOption "Skynet Nextcloud";
|
||||
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
domain = {
|
||||
tld = mkOption {
|
||||
type = types.str;
|
||||
|
@ -64,12 +54,12 @@ in {
|
|||
{
|
||||
record = cfg.domain.sub;
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
{
|
||||
record = "onlyoffice.${cfg.domain.sub}";
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -109,11 +99,6 @@ in {
|
|||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"${cfg.host.ip}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
locations."/".return = "307 https://skynet.ie";
|
||||
};
|
||||
${domain} = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue