Compare commits

...

2 Commits

Author SHA1 Message Date
fd1482baf8
rpi4: separate htpasswd for octoprint camera proxy 2024-07-12 11:32:23 -04:00
fb802d50f8
secrets: htpasswd-age 2024-07-12 11:31:16 -04:00
3 changed files with 14 additions and 1 deletions

View File

@ -10,6 +10,11 @@
group = "secrets";
};
age.secrets.htpasswd-cam = {
file = ../../secrets/htpasswd-cam.age;
group = "nginx";
mode = "0750";
};
age.secrets.htpasswd = {
file = ../../secrets/htpasswd.age;
group = "nginx";
@ -113,7 +118,14 @@
"rss.protogen.io" = mkReverseProxy 8082;
"blahaj.protogen.io" = mkReverseProxy 8086;
# octoprint (proxy_addr is 10.10.1.8)
"print.protogen.io" = mkProxy { auth = true; upstream = "http://10.10.1.8:80"; };
"print.protogen.io" = lib.mkMerge [ (mkProxy { auth = true; upstream = "http://10.10.1.8:80"; })
{
locations."/camera" = {
proxyPass = "http://10.10.1.8:80$request_uri";
proxyWebsockets = true;
basicAuthFile = config.age.secrets.htpasswd-cam.path;
};
}];
# searx auth 8088 (none for /favicon.ico, /autocompleter, /opensearch.xml)
"search.protogen.io".locations."/".return = "302 https://searx.protogen.io$request_uri";
"searx.protogen.io" = let

BIN
secrets/htpasswd-cam.age Normal file

Binary file not shown.

View File

@ -15,5 +15,6 @@ in
"cloudflare-dns.age".publicKeys = [ rpi4 ] ++ all-user;
"wireguard-rpi4.age".publicKeys = [ rpi4 ] ++ all-user;
"htpasswd.age".publicKeys = [ rpi4 ] ++ all-user;
"htpasswd-cam.age".publicKeys = [ rpi4 ] ++ all-user;
}