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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue