systemPackages: improve readability with shorter service references

This commit is contained in:
Erik Arvstedt 2019-11-27 14:04:36 +01:00
parent 14ecb5511a
commit 2b9b3ba1c5
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -155,32 +155,31 @@ in {
}]; }];
version = 3; version = 3;
}; };
environment.systemPackages = with pkgs; with nix-bitcoin; [ environment.systemPackages = with pkgs; with nix-bitcoin; let
s = config.services;
in
[
tor tor
bitcoind bitcoind
(hiPrio config.services.bitcoind.cli) (hiPrio s.bitcoind.cli)
nodeinfo nodeinfo
jq jq
qrencode qrencode
] ]
++ optionals config.services.clightning.enable [clightning (hiPrio config.services.clightning.cli)] ++ optionals s.clightning.enable [clightning (hiPrio s.clightning.cli)]
++ optionals config.services.lnd.enable [lnd (hiPrio config.services.lnd.cli)] ++ optionals s.lnd.enable [lnd (hiPrio s.lnd.cli)]
++ optionals config.services.lightning-charge.enable [lightning-charge] ++ optionals s.lightning-charge.enable [lightning-charge]
++ optionals config.services.nanopos.enable [nanopos] ++ optionals s.nanopos.enable [nanopos]
++ optionals config.services.nix-bitcoin-webindex.enable [nginx] ++ optionals s.nix-bitcoin-webindex.enable [nginx]
++ optionals config.services.liquidd.enable [ ++ optionals s.liquidd.enable [elementsd (hiPrio s.liquidd.cli) (hiPrio s.liquidd.swap-cli)]
elementsd ++ optionals s.spark-wallet.enable [spark-wallet]
(hiPrio config.services.liquidd.cli) ++ optionals s.electrs.enable [electrs]
(hiPrio config.services.liquidd.swap-cli) ++ optionals (s.hardware-wallets.ledger || s.hardware-wallets.trezor) [
]
++ optionals config.services.spark-wallet.enable [spark-wallet]
++ optionals config.services.electrs.enable [electrs]
++ optionals (config.services.hardware-wallets.ledger || config.services.hardware-wallets.trezor) [
hwi hwi
# To allow debugging issues with lsusb: # To allow debugging issues with lsusb
usbutils usbutils
] ]
++ optionals config.services.hardware-wallets.trezor [ ++ optionals s.hardware-wallets.trezor [
python3.pkgs.trezor python3.pkgs.trezor
]; ];
}; };