1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 17:19:45 +01:00
home-manager/tests/modules/programs/irsii/example-settings.nix
Rodney Lorrimar afb5fd962c
irssi: add ssl_cert option for servers (#2043)
* irssi: add ssl_cert option for servers

I was following these instructions
https://www.oftc.net/NickServ/CertFP/
and found that the `/server add -ssl_cert` option was needed.

This patch therefore adds an optional
`programs.irssi.networks.<name>.server.ssl.certificateFile` path.

Perhaps this could also be done with a `settings` attribute, but that
would probably require most of this module to be reworked.

* irsii: Add example-settings test case
2021-06-06 15:31:25 -06:00

31 lines
669 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.irssi = {
enable = true;
networks.oftc = {
nick = "nick";
server = {
address = "irc.oftc.net";
port = 6697;
autoConnect = true;
ssl.certificateFile =
"${config.home.homeDirectory}/.irssi/certs/nick.pem";
};
channels.home-manager.autoJoin = true;
};
};
nmt.script = ''
assertFileContent \
home-files/.irssi/config \
${./example-settings-expected.config}
'';
nixpkgs.overlays =
[ (self: super: { irsii = pkgs.writeScriptBin "dummy-irsii" ""; }) ];
};
}