diff --git a/host/nocix/amd-legacy-quadcore/configuration.nix b/host/nocix/amd-legacy-quadcore/configuration.nix index b0b43c0..d764798 100644 --- a/host/nocix/amd-legacy-quadcore/configuration.nix +++ b/host/nocix/amd-legacy-quadcore/configuration.nix @@ -22,6 +22,11 @@ pkgs.dig pkgs.gitMinimal ]; + myModules = { + nidus-sync = { + domainNameSync = "staging-sync.nidus.cloud"; + }; + }; services.openssh.enable = true; users.users.root.openssh.authorizedKeys.keys = [ diff --git a/host/nocix/amd-legacy-sexcore/configuration.nix b/host/nocix/amd-legacy-sexcore/configuration.nix index b0b43c0..a62cba0 100644 --- a/host/nocix/amd-legacy-sexcore/configuration.nix +++ b/host/nocix/amd-legacy-sexcore/configuration.nix @@ -22,6 +22,11 @@ pkgs.dig pkgs.gitMinimal ]; + myModules = { + nidus-sync = { + domainNameSync = "sync.nidus.cloud"; + }; + }; services.openssh.enable = true; users.users.root.openssh.authorizedKeys.keys = [ diff --git a/modules/system/nidus-sync.nix b/modules/system/nidus-sync.nix index 76df98f..99d872f 100644 --- a/modules/system/nidus-sync.nix +++ b/modules/system/nidus-sync.nix @@ -2,11 +2,11 @@ with lib; let backupName = nidusName; + cfg = config.myModules.nidus-sync; databaseName = nidusName; databaseUser = nidusName; dataDirectory = /mnt/bigdisk/nidus-sync; domainNameReport = "report.mosquitoes.online"; - domainNameSync = "sync.nidus.cloud"; group = nidusName; nidusName = "nidus-sync"; nidus-sync-pkg = inputs.nidus-sync.packages.x86_64-linux.default; @@ -16,7 +16,13 @@ let environmentFile = "/var/run/secrets/${nidusName}-env"; in { - options.myModules.nidus-sync.enable = mkEnableOption "custom nidus-sync configuration"; + options.myModules.nidus-sync = { + domainNameSync = mkOption { + example = "sync.nidus.cloud"; + type = types.str; + }; + enable = mkEnableOption "custom nidus-sync configuration"; + }; config = mkIf config.myModules.nidus-sync.enable { environment.systemPackages = with pkgs; [ @@ -28,7 +34,7 @@ in { reverse_proxy http://127.0.0.1:${toString port} ''; }; - services.caddy.virtualHosts."${domainNameSync}" = { + services.caddy.virtualHosts."${cfg.domainNameSync}" = { extraConfig = '' reverse_proxy http://127.0.0.1:${toString port} ''; diff --git a/roles/nidus-sync.nix b/roles/nidus-sync.nix index eca24c6..0a6319e 100644 --- a/roles/nidus-sync.nix +++ b/roles/nidus-sync.nix @@ -1,26 +1,5 @@ { inputs, lib, pkgs, ...}: -let - fss-deltamvcd = import ../modules/system/fieldseeker-sync.nix { - customer = "deltamvcd"; - dataDirectory = /mnt/bigdisk/fieldseeker-sync/deltamvcd; - fieldseeker-sync = inputs.fieldseeker-sync; - port = 3000; - subdomain = "deltamvcd"; - inherit lib pkgs; - }; -in { - environment = pkgs.lib.mkMerge [ fss-deltamvcd.environment ]; - services = pkgs.lib.mkMerge [ - fss-deltamvcd.services - ]; - sops = pkgs.lib.mkMerge [ - fss-deltamvcd.sops - ]; - systemd = pkgs.lib.mkMerge [ fss-deltamvcd.systemd ]; - users = pkgs.lib.mkMerge [ - fss-deltamvcd.users - ]; - +{ myModules.asterisk.enable = false; myModules.caddy.enable = true; myModules.qgis.enable = false;