modules: show warnings for obsolete options
This commit is contained in:
parent
45c40c4eb9
commit
18c7842e1a
28
modules/obsolete-options.nix
Normal file
28
modules/obsolete-options.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ 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" ])
|
||||||
|
|
||||||
|
(mkRenamedAnnounceTorOption "clightning")
|
||||||
|
(mkRenamedAnnounceTorOption "lnd")
|
||||||
|
];
|
||||||
|
}
|
@ -76,6 +76,10 @@ let
|
|||||||
lastChange = builtins.elemAt changes (builtins.length changes - 1);
|
lastChange = builtins.elemAt changes (builtins.length changes - 1);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./obsolete-options.nix
|
||||||
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
nix-bitcoin.configVersion = mkOption {
|
nix-bitcoin.configVersion = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
|
Loading…
Reference in New Issue
Block a user