Skip to content

Commit

Permalink
nixos/authelia: Remove settings.server.{host,port} options, replaced …
Browse files Browse the repository at this point in the history
…by settings.server.address
  • Loading branch information
nicomem committed Apr 6, 2024
1 parent 30d2589 commit 9460a32
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions nixos/modules/services/security/authelia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ let
cfg = config.services.authelia;

format = pkgs.formats.yaml { };
configFile = format.generate "config.yml" cfg.settings;

autheliaOpts = with lib; { name, ... }: {
options = {
Expand Down Expand Up @@ -156,18 +155,12 @@ let
};

server = {
host = mkOption {
address = mkOption {
type = types.str;
default = "localhost";
example = "0.0.0.0";
default = "tcp://:9091/";
example = "unix:///var/run/authelia.sock";
description = mdDoc "The address to listen on.";
};

port = mkOption {
type = types.port;
default = 9091;
description = mdDoc "The port to listen on.";
};
};

log = {
Expand Down Expand Up @@ -379,6 +372,15 @@ in
Do not include raw secrets in nix settings.
'';
}
{
# Removed options. Cannot use mkRemovedOptionModule (or similar methods) due to errors.
# See https://github.com/NixOS/nixpkgs/pull/299309#issuecomment-2038240493
assertion = !((instance.settings.server ? host) || (instance.settings.server ? port));
message = ''
The options `services.authelia.${name}.settings.server.host' and `services.authelia.${name}.settings.server.port'
have been replaced with `services.authelia.${name}.settings.server.address'.
'';
}
]
));

Expand Down

0 comments on commit 9460a32

Please sign in to comment.