mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-05-20 13:22:34 +02:00
Add variables for domain & tunnel id
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
@@ -19,7 +20,7 @@
|
||||
extraConfig = ''
|
||||
port_in_redirect off;
|
||||
absolute_redirect off;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' data: https://umami.hadi.icu; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://git.hadi.icu; connect-src 'self' https://umami.hadi.icu;" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' data: https://umami.${config.var.domain}; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://git.${config.var.domain}; connect-src 'self' https://umami.${config.var.domain};" always;
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -31,14 +32,14 @@
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
return 301 https://hadi.icu$request_uri;
|
||||
return 301 https://${config.var.domain}$request_uri;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
cloudflared.tunnels."a1dfa315-7fc3-4a65-8c02-8387932c35c3".ingress = {
|
||||
"hadi.icu" = "http://127.0.0.1:8758";
|
||||
"www.hadi.icu" = "http://127.0.0.1:8189";
|
||||
cloudflared.tunnels."${config.var.tunnelId}".ingress = {
|
||||
"${config.var.domain}" = "http://127.0.0.1:8758";
|
||||
"www.${config.var.domain}" = "http://127.0.0.1:8189";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user