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
|
@ -134,16 +134,6 @@ in {
|
|||
|
||||
enable = mkEnableOption "Skynet Email";
|
||||
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "skynet.ie";
|
||||
|
@ -246,12 +236,6 @@ in {
|
|||
|
||||
# to provide the certs
|
||||
services.nginx.virtualHosts = {
|
||||
"${cfg.host.ip}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
locations."/".return = "307 https://skynet.ie";
|
||||
};
|
||||
|
||||
"mail.skynet.ie" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "mail";
|
||||
|
@ -291,7 +275,7 @@ in {
|
|||
{
|
||||
record = "mail";
|
||||
r_type = "A";
|
||||
value = cfg.host.ip;
|
||||
value = config.services.skynet.host.ip;
|
||||
}
|
||||
#DNS config for K-9 Mail
|
||||
{
|
||||
|
@ -345,7 +329,7 @@ in {
|
|||
|
||||
# reverse pointer
|
||||
{
|
||||
record = cfg.host.ip;
|
||||
record = config.services.skynet.host.ip;
|
||||
r_type = "PTR";
|
||||
value = "${cfg.sub}.${cfg.domain}.";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue