From ab188f03f8c07a75ab6ff106a61e95b407feeb49 Mon Sep 17 00:00:00 2001 From: padreug Date: Wed, 24 Dec 2025 17:13:26 +0100 Subject: [PATCH] lnd: use optionals instead of optional for list additions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use optionals with explicit list syntax for requires, after, and extraGroups. This makes it clearer that we're conditionally adding elements to a list. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- modules/lnd.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lnd.nix b/modules/lnd.nix index 3482cce..163d547 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -261,8 +261,8 @@ in { systemd.services.lnd = { wantedBy = [ "multi-user.target" ]; - requires = optional (cfg.backend == "bitcoind") "bitcoind.service"; - after = optional (cfg.backend == "bitcoind") "bitcoind.service" ++ [ "nix-bitcoin-secrets.target" ]; + requires = optionals (cfg.backend == "bitcoind") [ "bitcoind.service" ]; + after = optionals (cfg.backend == "bitcoind") [ "bitcoind.service" ] ++ [ "nix-bitcoin-secrets.target" ]; preStart = '' install -m600 ${configFile} '${cfg.dataDir}/lnd.conf' ${optionalString (cfg.backend == "bitcoind") '' @@ -324,7 +324,7 @@ in { users.users.${cfg.user} = { isSystemUser = true; group = cfg.group; - extraGroups = optional (cfg.backend == "bitcoind") "bitcoinrpc-public"; + extraGroups = optionals (cfg.backend == "bitcoind") [ "bitcoinrpc-public" ]; home = cfg.dataDir; # lnd creates .lnd dir in HOME }; users.groups.${cfg.group} = {};