From 74fbfa3a5da2c503d8e14267366500b65fb9e878 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 7 Apr 2020 22:47:39 +0200 Subject: [PATCH] use lib.optionals --- modules/presets/secure-node.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/presets/secure-node.nix b/modules/presets/secure-node.nix index 8d4f33a..56b44e6 100644 --- a/modules/presets/secure-node.nix +++ b/modules/presets/secure-node.nix @@ -136,11 +136,11 @@ in { users.users.operator = { isNormalUser = true; extraGroups = [ config.services.bitcoind.group ] - ++ (if config.services.clightning.enable then [ "clightning" ] else [ ]) - ++ (if config.services.lnd.enable then [ "lnd" ] else [ ]) - ++ (if config.services.liquidd.enable then [ config.services.liquidd.group ] else [ ]) - ++ (if (config.services.hardware-wallets.ledger || config.services.hardware-wallets.trezor) - then [ config.services.hardware-wallets.group ] else [ ]); + ++ (optionals config.services.clightning.enable [ "clightning" ]) + ++ (optionals config.services.lnd.enable [ "lnd" ]) + ++ (optionals config.services.liquidd.enable [ config.services.liquidd.group ]) + ++ (optionals (config.services.hardware-wallets.ledger || config.services.hardware-wallets.trezor) + [ config.services.hardware-wallets.group ]); }; # Give operator access to onion hostnames services.onion-chef.enable = true;