Skip to content

Commit af742b6

Browse files
committed
chore: added aliases for proxy
1 parent 9954b9a commit af742b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

module.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ flake: {
1616
caddy = lib.mkIf (cfg.enable && cfg.proxy.enable && cfg.proxy.proxy == "caddy") {
1717
services.caddy.virtualHosts = lib.debug.traceIf (builtins.isNull cfg.proxy.domain) "proxy.domain can't be null, please specicy it properly!" {
1818
"${cfg.proxy.domain}" = {
19+
serverAliases = cfg.proxy.aliases;
1920
extraConfig = ''
2021
reverse_proxy 127.0.0.1:${toString cfg.port}
2122
'';
@@ -135,6 +136,13 @@ in {
135136
description = "Domain to use while adding configurations to web proxy server";
136137
};
137138

139+
aliases = mkOption {
140+
type = with types; listOf str;
141+
default = [];
142+
example = ["www.devops-journey.uz"];
143+
description = "List of domain aliases to add to domain";
144+
};
145+
138146
proxy = mkOption {
139147
type = with types;
140148
nullOr (enum [

0 commit comments

Comments
 (0)