From fff3fa31b956a08f6d8fa425c69a251ab014f299 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 14 Oct 2025 18:55:30 +0000 Subject: [PATCH] Switch to full domains in frps config --- modules/system/frps.nix | 12 ++++++------ roles/sovr.nix | 38 +++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/system/frps.nix b/modules/system/frps.nix index d768102..69fbc5b 100644 --- a/modules/system/frps.nix +++ b/modules/system/frps.nix @@ -6,11 +6,11 @@ let user = "frps"; in { options.myModules.frps = { - enable = mkEnableOption "custom frps configuration"; - subdomains = mkOption { + domains = mkOption { type = types.listOf types.str; - description = "All the subdomains to handle"; + description = "All the domains to handle"; }; + enable = mkEnableOption "custom frps configuration"; }; config = mkIf config.myModules.frps.enable { environment = { @@ -21,13 +21,13 @@ in { }; services.caddy.virtualHosts = mkMerge ( - map (subdomain: { - "${subdomain}.sovr.cloud" = { + map (domain: { + "${domain}" = { extraConfig = '' reverse_proxy [::1]:8000 ''; }; - }) cfg.subdomains + }) cfg.domains ); sops.secrets.frps-env = { format = "dotenv"; diff --git a/roles/sovr.nix b/roles/sovr.nix index bd49f63..48cfc35 100644 --- a/roles/sovr.nix +++ b/roles/sovr.nix @@ -1,25 +1,25 @@ { config, lib, pkgs, ... }: { myModules.caddy.enable = true; myModules.frps = { - enable = true; - subdomains = [ - "audiobooks" - "auth" - "carddav" - "chores" - "collabora" - "docs" - "files" - "home-assistant" - "movies" - "notes" - "passwords" - "pdf" - "photos" - "plex" - "source" - "todo" - "tv" + domains = [ + "audiobooks.theribbles.org" + "auth.theribbles.org" + "carddav.theribbles.org" + "chores.theribbles.org" + "collabora.theribbles.org" + "docs.theribbles.org" + "files.theribbles.org" + "home-assistant.theribbles.org" + "movies.theribbles.org" + "notes.theribbles.org" + "passwords.theribbles.org" + "pdf.theribbles.org" + "photos.theribbles.org" + "plex.theribbles.org" + "source.theribbles.org" + "todo.theribbles.org" + "tv.theribbles.org" ]; + enable = true; }; }