mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +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}";
|
type = "${v.type}";
|
||||||
nick = "${quoteStr v.nick}";
|
nick = "${quoteStr v.nick}";
|
||||||
autosendcmd = "${concatMapStringsSep ";" quoteStr v.autoCommands}";
|
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}";
|
ssl_verify = "${lib.hm.booleans.yesNo v.server.ssl.verify}";
|
||||||
autoconnect = "${lib.hm.booleans.yesNo v.server.autoConnect}";
|
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}";
|
ssl_cert = "${v.server.ssl.certificateFile}";
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
@ -142,6 +147,15 @@ let
|
||||||
type = types.attrsOf channelType;
|
type = types.attrsOf channelType;
|
||||||
default = { };
|
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";
|
type = "IRC";
|
||||||
nick = "nick";
|
nick = "nick";
|
||||||
autosendcmd = "";
|
autosendcmd = "";
|
||||||
|
sasl_username = "nick";
|
||||||
|
sasl_mechanism = "EXTERNAL";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,7 @@ with lib;
|
||||||
enable = true;
|
enable = true;
|
||||||
networks.oftc = {
|
networks.oftc = {
|
||||||
nick = "nick";
|
nick = "nick";
|
||||||
|
saslExternal = true;
|
||||||
server = {
|
server = {
|
||||||
address = "irc.oftc.net";
|
address = "irc.oftc.net";
|
||||||
port = 6697;
|
port = 6697;
|
||||||
|
|
Loading…
Reference in a new issue