feat: simplified the config for running services, only one hosts config is required now in each server config file

This commit is contained in:
silver 2024-05-30 17:55:29 +01:00
parent f8c7860eb5
commit 379cb84839
Signed by: silver
GPG key ID: 54E2C71918E93B74
34 changed files with 200 additions and 581 deletions

View file

@ -17,14 +17,7 @@ in {
];
options.services.skynet."${name}" = {
host = {
ip = mkOption {
type = types.str;
};
name = mkOption {
type = types.str;
};
};
enable = mkEnableOption "Skynet User Linux Server";
};
config = {
@ -48,12 +41,12 @@ in {
{
record = "users";
r_type = "CNAME";
value = cfg.host.name;
value = config.services.skynet.host.name;
}
{
record = "*.users";
r_type = "CNAME";
value = cfg.host.name;
value = config.services.skynet.host.name;
}
];
@ -92,12 +85,6 @@ in {
};
services.nginx.virtualHosts = {
"${cfg.host.ip}" = {
forceSSL = true;
useACMEHost = "skynet";
locations."/".return = "307 https://skynet.ie";
};
# main site
"*.users.skynet.ie" = {
forceSSL = true;