Switch to full domains in frps config
This commit is contained in:
parent
1119c3668c
commit
fff3fa31b9
2 changed files with 25 additions and 25 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue