From 987e7cb80ce5878269ee4b2bc7af2b614658ae74 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Tue, 10 Oct 2023 21:27:43 +0200 Subject: [PATCH] Enable 2FA in roundcube --- modules/services/roundcube/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/services/roundcube/default.nix b/modules/services/roundcube/default.nix index 8d65a19..410091f 100644 --- a/modules/services/roundcube/default.nix +++ b/modules/services/roundcube/default.nix @@ -1,6 +1,14 @@ { config, inputs, lib, pkgs, ... }: let cfg = config.services.az-roundcube; + twofactor_gauthenticator = pkgs.roundcubePlugins.roundcubePlugin rec { + pname = "twofactor_gauthenticator"; + version = "v2023-09-13"; + src = pkgs.fetchzip { + url = "https://github.com/alexandregz/twofactor_gauthenticator/archive/95f7b5a8c17db9e9f089656e06ae6703d139e76e.zip"; + hash = "sha256-BsGLLJ4YP+y+DFSwbSEx8Hqh9wfJAS/V6iLQEym1W10="; + }; + }; in { options = { @@ -76,9 +84,9 @@ in ''; hostName = "mail.zweili.org"; maxAttachmentSize = 25; - plugins = [ "carddav" "persistent_login" ]; + plugins = [ "carddav" "persistent_login" "twofactor_gauthenticator" ]; package = pkgs.roundcube.withPlugins (plugins: - with plugins; [ carddav persistent_login ] + with plugins; [ carddav persistent_login twofactor_gauthenticator ] ); }; };