Replace Authelia with Authentik
This commit is contained in:
parent
b09ce94621
commit
81b553c8b0
13 changed files with 117 additions and 313 deletions
78
modules/authentik.nix
Normal file
78
modules/authentik.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
nixhelm,
|
||||
system,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.authentik.enable = lib.mkEnableOption "authentik";
|
||||
|
||||
config = lib.mkIf config.authentik.enable {
|
||||
kubernetes = {
|
||||
helm.releases.authentik = {
|
||||
chart = nixhelm.chartsDerivations.${system}.authentik.authentik;
|
||||
includeCRDs = true;
|
||||
namespace = "authentik";
|
||||
|
||||
values = {
|
||||
authentik = {
|
||||
secret_key = "ref+sops://secrets.yml#/authentik/secret_key";
|
||||
postgresql.password = "ref+sops://secrets.yml#/authentik/postgresql_password";
|
||||
};
|
||||
|
||||
postgresql = {
|
||||
enabled = true;
|
||||
auth.password = "ref+sops://secrets.yml#/authentik/postgresql_password";
|
||||
primary.persistence.existingClaim = "db";
|
||||
};
|
||||
|
||||
redis = {
|
||||
enabled = true;
|
||||
master.persistence.existingClaim = "redis";
|
||||
};
|
||||
|
||||
email = {
|
||||
host = "mail.smtp2go.com";
|
||||
port = 2525;
|
||||
username = "ref+sops://secrets.yml#/smtp2go/username";
|
||||
password = "ref+sops://secrets.yml#/smtp2go/password";
|
||||
from = "Authentik <authentik@kun.is>";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lab = {
|
||||
longhorn.persistentVolumeClaim = {
|
||||
db = {
|
||||
volumeName = "authentik-db";
|
||||
storage = "10Gi";
|
||||
};
|
||||
|
||||
redis = {
|
||||
volumeName = "authentik-redis";
|
||||
storage = "5Gi";
|
||||
};
|
||||
};
|
||||
|
||||
ingresses.authentik = {
|
||||
host = "authentik.kun.is";
|
||||
|
||||
service = {
|
||||
name = "authentik-server";
|
||||
portName = "http";
|
||||
};
|
||||
};
|
||||
|
||||
tailscaleIngresses = {
|
||||
tailscale-authentik = {
|
||||
host = "authentik";
|
||||
service = {
|
||||
name = "authentik-server";
|
||||
portName = "http";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue