aboutsummaryrefslogtreecommitdiff
path: root/profiles/authelia.nix
blob: 4a8059177e7c24497eb2068f434071e6bee3cb44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ config, ... }:
{
  services.authelia.instances.main = {
    enable = true;
    secrets.jwtSecretFile = config.age.secrets."authelia-jwt-key".path;
    secrets.oidcIssuerPrivateKeyFile = config.age.secrets."authelia-jwks".path;
    secrets.storageEncryptionKeyFile = config.age.secrets."authelia-storage-key".path;
    settings = {
      server.address = "tcp://:9092";
      default_2fa_method = "totp";
      notifier.filesystem.filename = "/var/lib/authelia-main/notification.txt";
      authentication_backend = {
        file.path = config.age.secrets."authelia-users".path;
      };
      access_control.default_policy = "one_factor";
      session.domain = "fcuny.net";
      storage = {
        local = {
          path = "/var/lib/authelia-main/db.sqlite3";
        };
      };
    };
  };

  networking.firewall.allowedTCPPorts = [ 9092 ];
}