Skip to content

Commit

Permalink
nixos/mattermost: Add various defaultTexts
Browse files Browse the repository at this point in the history
  • Loading branch information
numinit committed Oct 26, 2024
1 parent 8be1640 commit b313008
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nixos/modules/services/web-apps/mattermost.nix
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ in
type = types.str;
default = if versionAtLeast config.system.stateVersion "24.11" then "/var/log/mattermost"
else "${cfg.dataDir}/logs";
defaultText = ''
if versionAtLeast config.system.stateVersion "24.11" then "/var/log/mattermost"
else "''${cfg.dataDir}/logs";
'';
description = ''
Mattermost log directory.
'';
Expand All @@ -241,6 +245,10 @@ in
type = types.str;
default = if versionAtLeast config.system.stateVersion "24.11" then "/etc/mattermost"
else "${cfg.dataDir}/config";
defaultText = ''
if versionAtLeast config.system.stateVersion "24.11" then "/etc/mattermost"
else "''${cfg.dataDir}/config";
'';
description = ''
Mattermost config directory.
'';
Expand Down Expand Up @@ -312,6 +320,7 @@ in
peerAuth = mkOption {
type = types.bool;
default = versionAtLeast config.system.stateVersion "24.11" && cfg.database.host == "localhost";
defaultText = ''versionAtLeast config.system.stateVersion "24.11" && cfg.database.host == "localhost"'';
description = ''
If set, will use peer auth instead of connecting to a Postgres server.
Use services.mattermost.database.socketPath to configure the socket path.
Expand Down Expand Up @@ -374,7 +383,8 @@ in
default = "mmpgsecret";
description = ''
Password for local Mattermost database user. If set and `host` is not a path,
will cause a warning nagging you to use environmentFile instead.
will cause a warning nagging you to use environmentFile instead since it will
end up in the Nix store.
'';
};

Expand Down

0 comments on commit b313008

Please sign in to comment.