mirror of
https://github.com/Superredstone/nixos.git
synced 2026-08-19 11:48:57 +02:00
feat(adguard): enable sso
This commit is contained in:
@@ -15,8 +15,6 @@
|
|||||||
465
|
465
|
||||||
587
|
587
|
||||||
993
|
993
|
||||||
3389
|
|
||||||
6636
|
|
||||||
25565
|
25565
|
||||||
27015
|
27015
|
||||||
];
|
];
|
||||||
@@ -24,8 +22,6 @@
|
|||||||
53
|
53
|
||||||
80
|
80
|
||||||
443
|
443
|
||||||
3389
|
|
||||||
6636
|
|
||||||
34197
|
34197
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,10 +6,6 @@
|
|||||||
settings = {
|
settings = {
|
||||||
disable_startup_analytics = true;
|
disable_startup_analytics = true;
|
||||||
avatars = "initials";
|
avatars = "initials";
|
||||||
listen = {
|
|
||||||
ldap = "0.0.0.0:3389";
|
|
||||||
ldaps = "0.0.0.0:6636";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
config,
|
config,
|
||||||
currentSystemUser,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
services.caddy =
|
services.caddy =
|
||||||
let
|
let
|
||||||
basicAuth = ''
|
authentikAuth = ''
|
||||||
basic_auth {
|
reverse_proxy /outpost.goauthentik.io/* http://127.0.0.1:9000
|
||||||
${currentSystemUser} $2a$14$L6SBwu.0FhGBYwH2LWa6uOrBSeRHo8Lo95Vkle/g5uB7kZl7nmJPO
|
|
||||||
|
forward_auth http://127.0.0.1:9000 {
|
||||||
|
uri /outpost.goauthentik.io/auth/caddy
|
||||||
|
copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Entitlements X-Authentik-Email X-Authentik-Name X-Authentik-Uid X-Authentik-Jwt X-Authentik-Meta-Jwks X-Authentik-Meta-Outpost X-Authentik-Meta-Provider X-Authentik-Meta-App X-Authentik-Meta-Version
|
||||||
|
trusted_proxies private_ranges
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
@@ -20,18 +22,6 @@
|
|||||||
root /var/www/patrickcanal.it/public
|
root /var/www/patrickcanal.it/public
|
||||||
file_server
|
file_server
|
||||||
'';
|
'';
|
||||||
"novnc.patrickcanal.it".extraConfig = ''
|
|
||||||
handle {
|
|
||||||
${basicAuth}
|
|
||||||
root ${pkgs.novnc}/share/webapps/novnc
|
|
||||||
file_server browse
|
|
||||||
}
|
|
||||||
|
|
||||||
handle /websockify {
|
|
||||||
${basicAuth}
|
|
||||||
reverse_proxy 127.0.0.1:6080
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
"vaultwarden.patrickcanal.it".extraConfig = ''
|
"vaultwarden.patrickcanal.it".extraConfig = ''
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy :8003 {
|
reverse_proxy :8003 {
|
||||||
@@ -84,7 +74,7 @@
|
|||||||
reverse_proxy :${toString config.services.homebox.settings.HBOX_WEB_PORT}
|
reverse_proxy :${toString config.services.homebox.settings.HBOX_WEB_PORT}
|
||||||
'';
|
'';
|
||||||
"adguard.patrickcanal.it".extraConfig = ''
|
"adguard.patrickcanal.it".extraConfig = ''
|
||||||
${basicAuth}
|
${authentikAuth}
|
||||||
reverse_proxy :${toString config.services.adguardhome.port}
|
reverse_proxy :${toString config.services.adguardhome.port}
|
||||||
'';
|
'';
|
||||||
"auth.patrickcanal.it".extraConfig = ''
|
"auth.patrickcanal.it".extraConfig = ''
|
||||||
@@ -92,19 +82,4 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.websockify = {
|
|
||||||
description = "Websockify for noVNC";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = "always";
|
|
||||||
DynamicUser = true;
|
|
||||||
ExecStart = ''
|
|
||||||
${pkgs.python3Packages.websockify}/bin/websockify \
|
|
||||||
--web ${pkgs.novnc}/share/webapps/novnc \
|
|
||||||
6080 127.0.0.1:5900
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user