hosts split in folders
This commit is contained in:
parent
9b88efa1fd
commit
c029483b12
13 changed files with 565 additions and 237 deletions
|
|
@ -1,57 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users.groups.authentik = { };
|
||||
users.users.authentik = {
|
||||
isSystemUser = true;
|
||||
extraGroups = [ "docker" ];
|
||||
group = "authentik";
|
||||
};
|
||||
services.authentik-ldap = {
|
||||
enable = true;
|
||||
environmentFile = "/var/lib/authentik-ldap-env";
|
||||
};
|
||||
services.authentik = {
|
||||
enable = true;
|
||||
# The environmentFile needs to be on the target host!
|
||||
# Best use something like sops-nix or agenix to manage it
|
||||
environmentFile = "/var/lib/authentik_secret";
|
||||
settings = {
|
||||
email = {
|
||||
host = "mail.${config.networking.domain}";
|
||||
port = 25;
|
||||
username = "authentik@${config.networking.domain}";
|
||||
use_tls = false;
|
||||
use_ssl = false;
|
||||
from = "authentik@${config.networking.domain}";
|
||||
};
|
||||
disable_startup_analytics = true;
|
||||
avatars = "initials";
|
||||
};
|
||||
|
||||
# nginx = {
|
||||
# enable = true;
|
||||
# enableACME = true;
|
||||
# host = "auth.${config.networking.domain}";
|
||||
# };
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"auth.${config.networking.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:9000";
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue