mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
irssi: add option for SASL external authentication
This commit is contained in:
parent
423211401c
commit
160025ca46
3 changed files with 18 additions and 1 deletions
|
@ -23,6 +23,11 @@ let
|
|||
type = "${v.type}";
|
||||
nick = "${quoteStr v.nick}";
|
||||
autosendcmd = "${concatMapStringsSep ";" quoteStr v.autoCommands}";
|
||||
${
|
||||
lib.optionalString (v.saslExternal) ''
|
||||
sasl_username = "${quoteStr v.nick}";
|
||||
sasl_mechanism = "EXTERNAL";''
|
||||
}
|
||||
};
|
||||
''));
|
||||
|
||||
|
@ -36,7 +41,7 @@ let
|
|||
ssl_verify = "${lib.hm.booleans.yesNo v.server.ssl.verify}";
|
||||
autoconnect = "${lib.hm.booleans.yesNo v.server.autoConnect}";
|
||||
${
|
||||
lib.optionalString (v.server.ssl.certificateFile != null) ''
|
||||
optionalString (v.server.ssl.certificateFile != null) ''
|
||||
ssl_cert = "${v.server.ssl.certificateFile}";
|
||||
''
|
||||
}
|
||||
|
@ -142,6 +147,15 @@ let
|
|||
type = types.attrsOf channelType;
|
||||
default = { };
|
||||
};
|
||||
|
||||
saslExternal = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable SASL external authentication. This requires setting a path in
|
||||
<xref linkend="opt-programs.irssi.networks._name_.server.ssl.certificateFile"/>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ oftc = {
|
|||
type = "IRC";
|
||||
nick = "nick";
|
||||
autosendcmd = "";
|
||||
sasl_username = "nick";
|
||||
sasl_mechanism = "EXTERNAL";
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -8,6 +8,7 @@ with lib;
|
|||
enable = true;
|
||||
networks.oftc = {
|
||||
nick = "nick";
|
||||
saslExternal = true;
|
||||
server = {
|
||||
address = "irc.oftc.net";
|
||||
port = 6697;
|
||||
|
|
Loading…
Reference in a new issue