b701cb5603
Move this feature from a module preset to a regular option, so that it's easily discoverable and accessible. Simplify the implementation of `generateSecrets` by adding it to the existing `setup-secrets` service script. Also rename option setup-secrets -> setupSecrets.
31 lines
1.7 KiB
Nix
31 lines
1.7 KiB
Nix
{ lib, ... }:
|
|
|
|
with lib;
|
|
let
|
|
mkRenamedAnnounceTorOption = service:
|
|
# use mkRemovedOptionModule because mkRenamedOptionModule fails with an infinite recursion error
|
|
mkRemovedOptionModule [ "services" service "announce-tor" ] ''
|
|
Use option `nix-bitcoin.onionServices.${service}.public` instead.
|
|
'';
|
|
in {
|
|
imports = [
|
|
(mkRenamedOptionModule [ "services" "bitcoind" "bind" ] [ "services" "bitcoind" "address" ])
|
|
(mkRenamedOptionModule [ "services" "bitcoind" "rpcallowip" ] [ "services" "bitcoind" "rpc" "allowip" ])
|
|
(mkRenamedOptionModule [ "services" "bitcoind" "rpcthreads" ] [ "services" "bitcoind" "rpc" "threads" ])
|
|
(mkRenamedOptionModule [ "services" "clightning" "bind-addr" ] [ "services" "clightning" "address" ])
|
|
(mkRenamedOptionModule [ "services" "clightning" "bindport" ] [ "services" "clightning" "port" ])
|
|
(mkRenamedOptionModule [ "services" "spark-wallet" "host" ] [ "services" "spark-wallet" "address" ])
|
|
(mkRenamedOptionModule [ "services" "lnd" "rpclisten" ] [ "services" "lnd" "rpcAddress" ])
|
|
(mkRenamedOptionModule [ "services" "lnd" "listen" ] [ "services" "lnd" "address" ])
|
|
(mkRenamedOptionModule [ "services" "lnd" "listenPort" ] [ "services" "lnd" "port" ])
|
|
(mkRenamedOptionModule [ "services" "btcpayserver" "bind" ] [ "services" "btcpayserver" "address" ])
|
|
(mkRenamedOptionModule [ "services" "liquidd" "bind" ] [ "services" "liquidd" "address" ])
|
|
(mkRenamedOptionModule [ "services" "liquidd" "rpcbind" ] [ "services" "liquidd" "rpc" "address" ])
|
|
|
|
(mkRenamedOptionModule [ "nix-bitcoin" "setup-secrets" ] [ "nix-bitcoin" "setupSecrets" ])
|
|
|
|
(mkRenamedAnnounceTorOption "clightning")
|
|
(mkRenamedAnnounceTorOption "lnd")
|
|
];
|
|
}
|