From a8d00f5c038cf7ec54e7dac9c57b171c1217f008 Mon Sep 17 00:00:00 2001 From: ReplayCoding Date: Sat, 12 Mar 2022 13:51:48 -0800 Subject: [PATCH] irssi: fix syntax error when no channels are specified (cherry picked from commit 5d4327cff4a5e54be8ca33d7c8a8dce6bdb64b93) --- modules/programs/irssi.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/programs/irssi.nix b/modules/programs/irssi.nix index a8f8a22f..ea749863 100644 --- a/modules/programs/irssi.nix +++ b/modules/programs/irssi.nix @@ -44,14 +44,15 @@ let } '')); - channelString = concatStringsSep cnl (flip mapAttrsToList cfg.networks (k: v: - concatStringsSep cnl (flip mapAttrsToList v.channels (c: cv: '' - { - chatnet = "${k}"; - name = "${c}"; - autojoin = "${boolStr cv.autoJoin}"; - } - '')))); + channelString = concatStringsSep cnl (concatLists + (flip mapAttrsToList cfg.networks (k: v: + (flip mapAttrsToList v.channels (c: cv: '' + { + chatnet = "${k}"; + name = "${c}"; + autojoin = "${boolStr cv.autoJoin}"; + } + ''))))); channelType = types.submodule { options = {