diff --git a/.cirrus.yml b/.cirrus.yml index 094d9aca9..ec1a31761 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,7 +9,7 @@ task: container: # Defined in https://github.com/nix-community/docker-nixpkgs - image: nixpkgs/nix-flakes:nixos-23.11 + image: nixpkgs/nix-flakes:nixos-24.05 matrix: - name: modules_test @@ -34,7 +34,7 @@ task: - name: flake build_script: - - nix flake check + - nix flake check --all-systems - ./test/nixos-search/ci-test.sh - name: shellcheck diff --git a/examples/configuration.nix b/examples/configuration.nix index 0013bb83e..2e45f3a59 100644 --- a/examples/configuration.nix +++ b/examples/configuration.nix @@ -318,7 +318,7 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? + system.stateVersion = "24.05"; # Did you read the comment? # The nix-bitcoin release version that your config is compatible with. # When upgrading to a backwards-incompatible release, nix-bitcoin will display an diff --git a/examples/deploy-krops.sh b/examples/deploy-krops.sh index 2f9bddb22..a4cfae1ad 100755 --- a/examples/deploy-krops.sh +++ b/examples/deploy-krops.sh @@ -123,7 +123,7 @@ c nodeinfo case ${1:-} in -i|--interactive) - . start-bash-session.sh + . ./start-bash-session.sh ;; esac diff --git a/examples/deploy-qemu-vm.sh b/examples/deploy-qemu-vm.sh index f4617e413..e3a90efc7 100755 --- a/examples/deploy-qemu-vm.sh +++ b/examples/deploy-qemu-vm.sh @@ -69,7 +69,7 @@ c nodeinfo case ${1:-} in -i|--interactive) - . start-bash-session.sh + . ./start-bash-session.sh ;; esac diff --git a/examples/flakes/flake.nix b/examples/flakes/flake.nix index 9b018f507..d273ceec8 100644 --- a/examples/flakes/flake.nix +++ b/examples/flakes/flake.nix @@ -10,7 +10,7 @@ inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release"; # You can also use a version branch to track a specific NixOS release - # inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-23.11"; + # inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-24.05"; inputs.nixpkgs.follows = "nix-bitcoin/nixpkgs"; inputs.nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable"; diff --git a/flake.lock b/flake.lock index 3cb878377..fe2759413 100644 --- a/flake.lock +++ b/flake.lock @@ -43,27 +43,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719957072, - "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", + "lastModified": 1721226092, + "narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", + "rev": "c716603a63aca44f39bef1986c13402167450e0a", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1720027103, - "narHash": "sha256-Q92DHQjIvaMLpawMdXnbKQjCkzAWqjhjWJYS5RcKujY=", + "lastModified": 1721209527, + "narHash": "sha256-UvhjON7sx/ALhJJPMSoUSJ4pvMGvHqvjEOX/AA7AjjM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "61684d356e41c97f80087e89659283d00fe032ab", + "rev": "5e73714b16ca222dcb2fc3ea2618fd7ba698da65", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index dfcf4280e..04c4a2477 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ ''; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; extra-container = { diff --git a/modules/backups.nix b/modules/backups.nix index 6db445807..7205f0309 100644 --- a/modules/backups.nix +++ b/modules/backups.nix @@ -6,7 +6,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Enable backups of node data. This uses the NixOS duplicity service. To further configure the backup, you can set NixOS options `services.duplicity.*`. @@ -16,34 +16,34 @@ let with-bulk-data = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Whether to also backup Bitcoin blockchain and other bulk data. ''; }; destination = mkOption { type = types.str; default = "file:///var/lib/localBackups"; - description = mdDoc '' + description = '' Where to back up to. ''; }; frequency = mkOption { type = types.nullOr types.str; default = null; - description = mdDoc '' + description = '' Run backup with the given frequency. If null, do not run automatically. ''; }; postgresqlDatabases = mkOption { type = types.listOf types.str; default = []; - description = mdDoc "List of database names to backup."; + description = "List of database names to backup."; }; extraFiles = mkOption { type = types.listOf types.str; default = []; example = [ "/var/lib/nginx" ]; - description = mdDoc "Additional files to be appended to filelist."; + description = "Additional files to be appended to filelist."; }; }; @@ -52,7 +52,7 @@ let # Potential backup file paths are matched against filelist # entries from top to bottom. # The first match determines inclusion or exclusion. - filelist = builtins.toFile "filelist.txt" '' + includeFileList = builtins.toFile "filelist.txt" '' ${builtins.concatStringsSep "\n" cfg.extraFiles} ${optionalString (!cfg.with-bulk-data) '' @@ -95,9 +95,7 @@ in { services.duplicity = { enable = true; - extraFlags = [ - "--include-filelist" "${filelist}" - ]; + inherit includeFileList; fullIfOlderThan = mkDefault "1M"; targetUrl = cfg.destination; frequency = cfg.frequency; diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index 2b6579510..062915c30 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -8,20 +8,20 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for peer connections."; + description = "Address to listen for peer connections."; }; port = mkOption { type = types.port; default = if !cfg.regtest then 8333 else 18444; defaultText = "if !cfg.regtest then 8333 else 18444"; - description = mdDoc "Port to listen for peer connections."; + description = "Port to listen for peer connections."; }; onionPort = mkOption { type = types.nullOr types.port; # When the bitcoind onion service is enabled, add an onion-tagged socket # to distinguish local connections from Tor connections default = if (config.nix-bitcoin.onionServices.bitcoind.enable or false) then 8334 else null; - description = mdDoc '' + description = '' Port to listen for Tor peer connections. If set, inbound connections to this port are tagged as onion peers. ''; @@ -29,7 +29,7 @@ let listen = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Listen for peer connections at `address:port` and `address:onionPort` (if {option}`onionPort` is set). ''; @@ -37,7 +37,7 @@ let listenWhitelisted = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Listen for peer connections at `address:whitelistedPort`. Peers connected through this socket are automatically whitelisted. ''; @@ -45,12 +45,12 @@ let whitelistedPort = mkOption { type = types.port; default = 8335; - description = mdDoc "See `listenWhitelisted`."; + description = "See `listenWhitelisted`."; }; getPublicAddressCmd = mkOption { type = types.str; default = ""; - description = mdDoc '' + description = '' Bash expression which outputs the public service address to announce to peers. If left empty, no address is announced. ''; @@ -59,7 +59,7 @@ let type = types.package; default = config.nix-bitcoin.pkgs.bitcoind; defaultText = "config.nix-bitcoin.pkgs.bitcoind"; - description = mdDoc "The package providing bitcoin binaries."; + description = "The package providing bitcoin binaries."; }; extraConfig = mkOption { type = types.lines; @@ -68,18 +68,18 @@ let par=16 logips=1 ''; - description = mdDoc "Extra lines appended to {file}`bitcoin.conf`."; + description = "Extra lines appended to {file}`bitcoin.conf`."; }; dataDir = mkOption { type = types.path; default = "/var/lib/bitcoind"; - description = mdDoc "The data directory for bitcoind."; + description = "The data directory for bitcoind."; }; rpc = { address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc '' + description = '' Address to listen for JSON-RPC connections. ''; }; @@ -87,23 +87,23 @@ let type = types.port; default = if !cfg.regtest then 8332 else 18443; defaultText = "if !cfg.regtest then 8332 else 18443"; - description = mdDoc "Port to listen for JSON-RPC connections."; + description = "Port to listen for JSON-RPC connections."; }; threads = mkOption { type = types.nullOr types.ints.u16; default = null; - description = mdDoc "The number of threads to service RPC calls."; + description = "The number of threads to service RPC calls."; }; allowip = mkOption { type = types.listOf types.str; default = [ "127.0.0.1" ]; - description = mdDoc '' + description = '' Allow JSON-RPC connections from specified sources. ''; }; users = mkOption { default = {}; - description = mdDoc '' + description = '' Allowed users for JSON-RPC connections. ''; example = { @@ -118,14 +118,14 @@ let type = types.str; default = name; example = "alice"; - description = mdDoc '' + description = '' Username for JSON-RPC connections. ''; }; passwordHMAC = mkOption { type = types.str; example = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae"; - description = mdDoc '' + description = '' Password HMAC-SHA-256 for JSON-RPC connections. Must be a string of the format `$`. ''; @@ -138,7 +138,7 @@ let rpcwhitelist = mkOption { type = types.listOf types.str; default = []; - description = mdDoc '' + description = '' List of allowed rpc calls for each user. If empty list, rpcwhitelist is disabled for that user. ''; @@ -150,7 +150,7 @@ let regtest = mkOption { type = types.bool; default = false; - description = mdDoc "Enable regtest mode."; + description = "Enable regtest mode."; }; network = mkOption { readOnly = true; @@ -163,12 +163,12 @@ let proxy = mkOption { type = types.nullOr types.str; default = if cfg.tor.proxy then config.nix-bitcoin.torClientAddressWithPort else null; - description = mdDoc "Connect through SOCKS5 proxy"; + description = "Connect through SOCKS5 proxy"; }; i2p = mkOption { type = types.enum [ false true "only-outgoing" ]; default = false; - description = mdDoc '' + description = '' Enable peer connections via i2p. With `only-outgoing`, incoming i2p connections are disabled. ''; @@ -176,7 +176,7 @@ let dataDirReadableByGroup = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' If enabled, data dir content is readable by the bitcoind service group. Warning: This disables bitcoind's wallet support. ''; @@ -184,7 +184,7 @@ let sysperms = mkOption { type = types.nullOr types.bool; default = null; - description = mdDoc '' + description = '' Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) ''; @@ -192,7 +192,7 @@ let disablewallet = mkOption { type = types.nullOr types.bool; default = null; - description = mdDoc '' + description = '' Do not load the wallet and disable wallet RPC calls ''; }; @@ -200,13 +200,13 @@ let type = types.nullOr (types.ints.between 4 16384); default = null; example = 4000; - description = mdDoc "Override the default database cache size in MiB."; + description = "Override the default database cache size in MiB."; }; prune = mkOption { type = types.ints.unsigned; default = 0; example = 10000; - description = mdDoc '' + description = '' Automatically prune block files to stay under the specified target size in MiB. Value 0 disables pruning. ''; @@ -214,25 +214,25 @@ let txindex = mkOption { type = types.bool; default = false; - description = mdDoc "Enable the transaction index."; + description = "Enable the transaction index."; }; zmqpubrawblock = mkOption { type = types.nullOr types.str; default = null; example = "tcp://127.0.0.1:28332"; - description = mdDoc "ZMQ address for zmqpubrawblock notifications"; + description = "ZMQ address for zmqpubrawblock notifications"; }; zmqpubrawtx = mkOption { type = types.nullOr types.str; default = null; example = "tcp://127.0.0.1:28333"; - description = mdDoc "ZMQ address for zmqpubrawtx notifications"; + description = "ZMQ address for zmqpubrawtx notifications"; }; assumevalid = mkOption { type = types.nullOr types.str; default = null; example = "00000000000000000000e5abc3a74fe27dc0ead9c70ea1deb456f11c15fd7bc6"; - description = mdDoc '' + description = '' If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification. ''; @@ -241,28 +241,28 @@ let type = types.listOf types.str; default = []; example = [ "ecoc5q34tmbq54wl.onion" ]; - description = mdDoc "Add nodes to connect to and attempt to keep the connections open"; + description = "Add nodes to connect to and attempt to keep the connections open"; }; discover = mkOption { type = types.nullOr types.bool; default = null; - description = mdDoc "Discover own IP addresses"; + description = "Discover own IP addresses"; }; addresstype = mkOption { type = types.nullOr types.str; default = null; example = "bech32"; - description = mdDoc "The type of addresses to use"; + description = "The type of addresses to use"; }; user = mkOption { type = types.str; default = "bitcoin"; - description = mdDoc "The user as which to run bitcoind."; + description = "The user as which to run bitcoind."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run bitcoind."; + description = "The group as which to run bitcoind."; }; cli = mkOption { readOnly = true; @@ -271,7 +271,7 @@ let exec ${cfg.package}/bin/bitcoin-cli -datadir='${cfg.dataDir}' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary to connect with the bitcoind instance."; + description = "Binary to connect with the bitcoind instance."; }; tor = nbLib.tor; }; @@ -373,16 +373,20 @@ in { "d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group} - -" ]; - systemd.services.bitcoind = { - # Use `wants` instead of `requires` so that bitcoind and all dependent services - # are not restarted when the secrets target restarts. - # The secrets target always restarts when deploying with one of the methods - # in ./deployment. - # - # TODO-EXTERNAL: Instead of `wants`, use a future systemd dependency type - # that propagates initial start failures but no restarts - wants = [ "nix-bitcoin-secrets.target" ]; - after = [ "network-online.target" "nix-bitcoin-secrets.target" ]; + systemd.services.bitcoind = rec { + wants = [ + "network-online.target" + # Use `wants` instead of `requires` for `nix-bitcoin-secrets.target` + # so that bitcoind and all dependent services are not restarted when + # the secrets target restarts. + # The secrets target always restarts when deploying with one of the methods + # in ./deployment. + # + # TODO-EXTERNAL: Instead of `wants`, use a future systemd dependency type + # that propagates initial start failures but no restarts + "nix-bitcoin-secrets.target" + ]; + after = wants; wantedBy = [ "multi-user.target" ]; preStart = let diff --git a/modules/btcpayserver.nix b/modules/btcpayserver.nix index e03247d1d..d5a8cd436 100644 --- a/modules/btcpayserver.nix +++ b/modules/btcpayserver.nix @@ -8,12 +8,12 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen on."; + description = "Address to listen on."; }; port = mkOption { type = types.port; default = 23000; - description = mdDoc "Port to listen on."; + description = "Port to listen on."; }; package = mkOption { type = types.package; @@ -22,38 +22,38 @@ let else config.nix-bitcoin.pkgs.btcpayserver; defaultText = "(See source)"; - description = mdDoc "The package providing btcpayserver binaries."; + description = "The package providing btcpayserver binaries."; }; dataDir = mkOption { type = types.path; default = "/var/lib/btcpayserver"; - description = mdDoc "The data directory for btcpayserver."; + description = "The data directory for btcpayserver."; }; lightningBackend = mkOption { type = types.nullOr (types.enum [ "clightning" "lnd" ]); default = null; - description = mdDoc "The lightning node implementation to use."; + description = "The lightning node implementation to use."; }; lbtc = mkOption { type = types.bool; default = false; - description = mdDoc "Enable liquid support in btcpayserver."; + description = "Enable liquid support in btcpayserver."; }; rootpath = mkOption { type = types.nullOr types.str; default = null; example = "btcpayserver"; - description = mdDoc "The prefix for root-relative btcpayserver URLs."; + description = "The prefix for root-relative btcpayserver URLs."; }; user = mkOption { type = types.str; default = "btcpayserver"; - description = mdDoc "The user as which to run btcpayserver."; + description = "The user as which to run btcpayserver."; }; group = mkOption { type = types.str; default = cfg.btcpayserver.user; - description = mdDoc "The group as which to run btcpayserver."; + description = "The group as which to run btcpayserver."; }; tor.enforce = nbLib.tor.enforce; }; @@ -63,7 +63,7 @@ let # This option is only used by netns-isolation internal = true; default = cfg.btcpayserver.enable; - description = mdDoc '' + description = '' nbxplorer is always enabled when btcpayserver is enabled. ''; }; @@ -71,32 +71,32 @@ let type = types.package; default = config.nix-bitcoin.pkgs.nbxplorer; defaultText = "config.nix-bitcoin.pkgs.nbxplorer"; - description = mdDoc "The package providing nbxplorer binaries."; + description = "The package providing nbxplorer binaries."; }; address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen on."; + description = "Address to listen on."; }; port = mkOption { type = types.port; default = 24444; - description = mdDoc "Port to listen on."; + description = "Port to listen on."; }; dataDir = mkOption { type = types.path; default = "/var/lib/nbxplorer"; - description = mdDoc "The data directory for nbxplorer."; + description = "The data directory for nbxplorer."; }; user = mkOption { type = types.str; default = "nbxplorer"; - description = mdDoc "The user as which to run nbxplorer."; + description = "The user as which to run nbxplorer."; }; group = mkOption { type = types.str; default = cfg.nbxplorer.user; - description = mdDoc "The group as which to run nbxplorer."; + description = "The group as which to run nbxplorer."; }; tor.enforce = nbLib.tor.enforce; }; diff --git a/modules/charge-lnd.nix b/modules/charge-lnd.nix index 5de39ea85..ab2348abb 100644 --- a/modules/charge-lnd.nix +++ b/modules/charge-lnd.nix @@ -9,14 +9,14 @@ let type = listOf str; default = []; example = [ "--verbose" "--dry-run" ]; - description = mdDoc "Extra flags to pass to the charge-lnd command."; + description = "Extra flags to pass to the charge-lnd command."; }; interval = mkOption { type = str; default = "*-*-* 04:00:00"; example = "hourly"; - description = mdDoc '' + description = '' Systemd calendar expression when to adjust fees. See {man}`systemd.time(7)` for possible values. @@ -28,7 +28,7 @@ let randomDelay = mkOption { type = str; default = "1h"; - description = mdDoc '' + description = '' Random delay to add to scheduled time. ''; }; @@ -54,7 +54,7 @@ let [default] strategy = ignore ''; - description = mdDoc '' + description = '' Policy definitions in INI format. See https://github.com/accumulator/charge-lnd/blob/master/README.md#usage diff --git a/modules/clightning-plugins/clboss.nix b/modules/clightning-plugins/clboss.nix index 84675b728..60bb29ddd 100644 --- a/modules/clightning-plugins/clboss.nix +++ b/modules/clightning-plugins/clboss.nix @@ -7,7 +7,7 @@ let cfg = config.services.clightning.plugins.clboss; in enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Whether to enable CLBOSS (clightning plugin). See also: https://github.com/ZmnSCPxj/clboss#operating ''; @@ -15,7 +15,7 @@ let cfg = config.services.clightning.plugins.clboss; in min-onchain = mkOption { type = types.ints.positive; default = 30000; - description = mdDoc '' + description = '' Target amount (in satoshi) that CLBOSS will leave on-chain. clboss will only open new channels if the funds in your clightning wallet are larger than this amount. @@ -24,17 +24,17 @@ let cfg = config.services.clightning.plugins.clboss; in min-channel = mkOption { type = types.ints.positive; default = 500000; - description = mdDoc "The minimum size (in satoshi) of channels created by CLBOSS."; + description = "The minimum size (in satoshi) of channels created by CLBOSS."; }; max-channel = mkOption { type = types.ints.positive; default = 16777215; - description = mdDoc "The maximum size (in satoshi) of channels created by CLBOSS."; + description = "The maximum size (in satoshi) of channels created by CLBOSS."; }; zerobasefee = mkOption { type = types.enum [ "require" "allow" "disallow" ]; default = "allow"; - description = mdDoc '' + description = '' `require`: set `base_fee` to 0. `allow`: set `base_fee` according to the CLBOSS heuristics, which may include value 0. `disallow`: set `base_fee` to according to the CLBOSS heuristics, with a minimum value of 1. @@ -44,7 +44,7 @@ let cfg = config.services.clightning.plugins.clboss; in type = types.package; default = config.nix-bitcoin.pkgs.clboss; defaultText = "config.nix-bitcoin.pkgs.clboss"; - description = mdDoc "The package providing clboss binaries."; + description = "The package providing clboss binaries."; }; }; diff --git a/modules/clightning-plugins/feeadjuster.nix b/modules/clightning-plugins/feeadjuster.nix index 9e9371f76..7e7c90562 100644 --- a/modules/clightning-plugins/feeadjuster.nix +++ b/modules/clightning-plugins/feeadjuster.nix @@ -6,7 +6,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Enable feeaduster (clightning plugin). This plugin auto-updates channel fees to keep channels balanced. @@ -18,17 +18,17 @@ let fuzz = mkOption { type = types.bool; default = true; - description = mdDoc "Enable update threshold randomization and hysteresis."; + description = "Enable update threshold randomization and hysteresis."; }; adjustOnForward = mkOption { type = types.bool; default = false; - description = mdDoc "Automatically update fees on forward events."; + description = "Automatically update fees on forward events."; }; method = mkOption { type = types.enum [ "soft" "default" "hard" ]; default = "default"; - description = mdDoc '' + description = '' Adjustment method to calculate channel fees. `soft`: less difference when adjusting fees. `hard`: greater difference when adjusting fees. @@ -37,7 +37,7 @@ let adjustDaily = mkOption { type = types.bool; default = true; - description = mdDoc "Automatically update fees daily."; + description = "Automatically update fees daily."; }; }; diff --git a/modules/clightning-plugins/trustedcoin.nix b/modules/clightning-plugins/trustedcoin.nix index 9ac14ca3c..e55b8f096 100644 --- a/modules/clightning-plugins/trustedcoin.nix +++ b/modules/clightning-plugins/trustedcoin.nix @@ -10,13 +10,13 @@ let cfg = config.services.clightning.plugins.trustedcoin; in type = types.package; default = config.nix-bitcoin.pkgs.trustedcoin; defaultText = "config.nix-bitcoin.pkgs.trustedcoin"; - description = mdDoc "The package providing trustedcoin binaries."; + description = "The package providing trustedcoin binaries."; }; tor.proxy = mkOption { type = types.bool; default = config.services.clightning.tor.proxy; - description = mdDoc "Whether to proxy outgoing connections with Tor."; + description = "Whether to proxy outgoing connections with Tor."; }; }; diff --git a/modules/clightning-plugins/zmq.nix b/modules/clightning-plugins/zmq.nix index 14a590800..f2e7627e4 100644 --- a/modules/clightning-plugins/zmq.nix +++ b/modules/clightning-plugins/zmq.nix @@ -25,7 +25,7 @@ let mkOption { type = types.nullOr types.str; default = null; - description = mdDoc "Endpoint for ${name}"; + description = "Endpoint for ${name}"; }; setEndpoint = ep: diff --git a/modules/clightning-replication.nix b/modules/clightning-replication.nix index 34dd34101..9ee4eeb95 100644 --- a/modules/clightning-replication.nix +++ b/modules/clightning-replication.nix @@ -6,7 +6,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Enable live replication of the clightning database. This prevents losing off-chain funds when the primary wallet file becomes inaccessible. @@ -26,7 +26,7 @@ let type = types.nullOr types.str; default = null; example = "user@10.0.0.1:directory"; - description = mdDoc '' + description = '' The SSH destination for which a SSHFS will be mounted. `directory` is relative to the home of `user`. @@ -40,12 +40,12 @@ let port = mkOption { type = types.port; default = 22; - description = mdDoc "SSH port of the remote server."; + description = "SSH port of the remote server."; }; sshOptions = mkOption { type = with types; listOf str; default = [ "reconnect" "ServerAliveInterval=50" ]; - description = mdDoc "SSH options used for mounting the SSHFS."; + description = "SSH options used for mounting the SSHFS."; }; }; local = { @@ -53,7 +53,7 @@ let type = types.nullOr types.path; default = null; example = "/var/backup/clightning"; - description = mdDoc '' + description = '' This option can be specified instead of `sshfs.destination` to enable replication to a local directory. @@ -69,7 +69,7 @@ let setupDirectory = mkOption { type = types.bool; default = true; - description = mdDoc '' + description = '' Create `local.directory` if it doesn't exist and set write permissions for the `clightning` user. ''; @@ -78,7 +78,7 @@ let encrypt = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Whether to encrypt the replicated database with gocryptfs. The encryption password is automatically generated and stored in file {file}`$secretsDir/clightning-replication-password`. diff --git a/modules/clightning-rest.nix b/modules/clightning-rest.nix index 516667159..c15ecdb2f 100644 --- a/modules/clightning-rest.nix +++ b/modules/clightning-rest.nix @@ -7,17 +7,17 @@ let port = mkOption { type = types.port; default = 3001; - description = mdDoc "REST server port."; + description = "REST server port."; }; docPort = mkOption { type = types.port; default = 4001; - description = mdDoc "Swagger API documentation server port."; + description = "Swagger API documentation server port."; }; dataDir = mkOption { type = types.path; default = "/var/lib/clightning-rest"; - description = mdDoc "The data directory for clightning-rest."; + description = "The data directory for clightning-rest."; }; extraConfig = mkOption { type = types.attrs; @@ -25,7 +25,7 @@ let example = { DOMAIN = "mynode.org"; }; - description = mdDoc '' + description = '' Extra config options. See: https://github.com/Ride-The-Lightning/c-lightning-REST#option-1-via-config-file-cl-rest-configjson ''; @@ -34,7 +34,7 @@ let group = mkOption { readOnly = true; default = clightning.group; - description = mdDoc "The group under which clightning-rest is run."; + description = "The group under which clightning-rest is run."; }; # Rest server address. # Not configurable. The server always listens on all interfaces: diff --git a/modules/clightning.nix b/modules/clightning.nix index 6a5651db7..766e2cec8 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -7,24 +7,24 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for peer connections."; + description = "Address to listen for peer connections."; }; port = mkOption { type = types.port; default = 9735; - description = mdDoc "Port to listen for peer connections."; + description = "Port to listen for peer connections."; }; proxy = mkOption { type = types.nullOr types.str; default = if cfg.tor.proxy then config.nix-bitcoin.torClientAddressWithPort else null; - description = mdDoc '' + description = '' Socks proxy for connecting to Tor nodes (or for all connections if option always-use-proxy is set). ''; }; always-use-proxy = mkOption { type = types.bool; default = cfg.tor.proxy; - description = mdDoc '' + description = '' Always use the proxy, even to connect to normal IP addresses. You can still connect to Unix domain sockets manually. This also disables all DNS lookups, to avoid leaking address information. @@ -33,18 +33,18 @@ let dataDir = mkOption { type = types.path; default = "/var/lib/clightning"; - description = mdDoc "The data directory for clightning."; + description = "The data directory for clightning."; }; networkDir = mkOption { readOnly = true; default = "${cfg.dataDir}/${network}"; - description = mdDoc "The network data directory."; + description = "The network data directory."; }; wallet = mkOption { type = types.nullOr types.str; default = null; example = "sqlite3:///var/lib/clightning/bitcoin/lightningd.sqlite3"; - description = mdDoc '' + description = '' Wallet data scheme (sqlite3 or postgres) and location/connection parameters, as fully qualified data source name. ''; @@ -64,7 +64,7 @@ let example = '' alias=mynode ''; - description = mdDoc '' + description = '' Extra lines appended to the configuration file. See all available options at @@ -75,18 +75,18 @@ let user = mkOption { type = types.str; default = "clightning"; - description = mdDoc "The user as which to run clightning."; + description = "The user as which to run clightning."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run clightning."; + description = "The group as which to run clightning."; }; package = mkOption { type = types.package; default = nbPkgs.clightning; defaultText = "config.nix-bitcoin.pkgs.clightning"; - description = mdDoc "The package providing clightning binaries."; + description = "The package providing clightning binaries."; }; cli = mkOption { readOnly = true; @@ -94,12 +94,12 @@ let ${cfg.package}/bin/lightning-cli --lightning-dir='${cfg.dataDir}' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary to connect with the clightning instance."; + description = "Binary to connect with the clightning instance."; }; getPublicAddressCmd = mkOption { type = types.str; default = ""; - description = mdDoc '' + description = '' Bash expression which outputs the public service address to announce to peers. If left empty, no address is announced. ''; diff --git a/modules/electrs.nix b/modules/electrs.nix index 110086fb0..0b8ff4f3e 100644 --- a/modules/electrs.nix +++ b/modules/electrs.nix @@ -7,37 +7,37 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for RPC connections."; + description = "Address to listen for RPC connections."; }; port = mkOption { type = types.port; default = 50001; - description = mdDoc "Port to listen for RPC connections."; + description = "Port to listen for RPC connections."; }; dataDir = mkOption { type = types.path; default = "/var/lib/electrs"; - description = mdDoc "The data directory for electrs."; + description = "The data directory for electrs."; }; monitoringPort = mkOption { type = types.port; default = 4224; - description = mdDoc "Prometheus monitoring port."; + description = "Prometheus monitoring port."; }; extraArgs = mkOption { type = types.separatedString " "; default = ""; - description = mdDoc "Extra command line arguments passed to electrs."; + description = "Extra command line arguments passed to electrs."; }; user = mkOption { type = types.str; default = "electrs"; - description = mdDoc "The user as which to run electrs."; + description = "The user as which to run electrs."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run electrs."; + description = "The group as which to run electrs."; }; tor.enforce = nbLib.tor.enforce; }; diff --git a/modules/fulcrum.nix b/modules/fulcrum.nix index 131fdddc1..4dc06fcc9 100644 --- a/modules/fulcrum.nix +++ b/modules/fulcrum.nix @@ -6,7 +6,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Enable fulcrum, an Electrum server implemented in C++. Compared to electrs, fulcrum has a 3x larger database size but @@ -23,17 +23,17 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for RPC connections."; + description = "Address to listen for RPC connections."; }; port = mkOption { type = types.port; default = 50001; - description = mdDoc "Port to listen for RPC connections."; + description = "Port to listen for RPC connections."; }; dataDir = mkOption { type = types.path; default = "/var/lib/fulcrum"; - description = mdDoc "The data directory for fulcrum."; + description = "The data directory for fulcrum."; }; extraConfig = mkOption { type = types.lines; @@ -41,7 +41,7 @@ let example = '' peering = true ''; - description = mdDoc '' + description = '' Extra lines appended to the configuration file. See all available options at @@ -51,12 +51,12 @@ let user = mkOption { type = types.str; default = "fulcrum"; - description = mdDoc "The user as which to run fulcrum."; + description = "The user as which to run fulcrum."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run fulcrum."; + description = "The group as which to run fulcrum."; }; tor.enforce = nbLib.tor.enforce; }; diff --git a/modules/hardware-wallets.nix b/modules/hardware-wallets.nix index 6957f5c65..d8d28714f 100644 --- a/modules/hardware-wallets.nix +++ b/modules/hardware-wallets.nix @@ -6,21 +6,21 @@ let ledger = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' If enabled, the ledger udev rules will be installed. ''; }; trezor = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' If enabled, the trezor udev rules will be installed. ''; }; group = mkOption { type = types.str; default = "hardware-wallets"; - description = mdDoc '' + description = '' Group the hardware wallet udev rules apply to. ''; }; diff --git a/modules/joinmarket-ob-watcher.nix b/modules/joinmarket-ob-watcher.nix index e2233be69..ec232c995 100644 --- a/modules/joinmarket-ob-watcher.nix +++ b/modules/joinmarket-ob-watcher.nix @@ -7,27 +7,27 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "HTTP server address."; + description = "HTTP server address."; }; port = mkOption { type = types.port; default = 62601; - description = mdDoc "HTTP server port."; + description = "HTTP server port."; }; dataDir = mkOption { readOnly = true; default = "/var/lib/joinmarket-ob-watcher"; - description = mdDoc "The data directory for JoinMarket orderbook watcher."; + description = "The data directory for JoinMarket orderbook watcher."; }; user = mkOption { type = types.str; default = "joinmarket-ob-watcher"; - description = mdDoc "The user as which to run JoinMarket."; + description = "The user as which to run JoinMarket."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run JoinMarket."; + description = "The group as which to run JoinMarket."; }; # This option is only used by netns-isolation. # Tor is always enabled. diff --git a/modules/joinmarket.nix b/modules/joinmarket.nix index 34343fa83..3579c427c 100644 --- a/modules/joinmarket.nix +++ b/modules/joinmarket.nix @@ -7,7 +7,7 @@ let payjoinAddress = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc '' + description = '' The address where payjoin onion connections are forwarded to. This address is never used directly, it only serves as the internal endpoint for the payjoin onion service. @@ -18,12 +18,12 @@ let payjoinPort = mkOption { type = types.port; default = 64180; # A random private port - description = mdDoc "The port corresponding to option {option}`payjoinAddress`."; + description = "The port corresponding to option {option}`payjoinAddress`."; }; messagingAddress = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc '' + description = '' The address where messaging onion connections are forwarded to. This address is never used directly, it only serves as the internal endpoint for the messaging onion service. @@ -33,29 +33,29 @@ let messagingPort = mkOption { type = types.port; default = 64181; # payjoinPort + 1 - description = mdDoc "The port corresponding to option {option}`messagingAddress`."; + description = "The port corresponding to option {option}`messagingAddress`."; }; dataDir = mkOption { type = types.path; default = "/var/lib/joinmarket"; - description = mdDoc "The data directory for JoinMarket."; + description = "The data directory for JoinMarket."; }; rpcWalletFile = mkOption { type = types.nullOr types.str; default = "jm_wallet"; - description = mdDoc '' + description = '' Name of the watch-only bitcoind wallet the JoinMarket addresses are imported to. ''; }; user = mkOption { type = types.str; default = "joinmarket"; - description = mdDoc "The user as which to run JoinMarket."; + description = "The user as which to run JoinMarket."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run JoinMarket."; + description = "The group as which to run JoinMarket."; }; cli = mkOption { default = cli; @@ -77,56 +77,56 @@ let ordertype = mkOption { type = types.enum [ "reloffer" "absoffer" ]; default = "reloffer"; - description = mdDoc '' + description = '' Which fee type to actually use. ''; }; cjfee_a = mkOption { type = types.ints.unsigned; default = 500; - description = mdDoc '' + description = '' Absolute offer fee you wish to receive for coinjoins (cj) in Satoshis. ''; }; cjfee_r = mkOption { type = types.float; default = 0.00002; - description = mdDoc '' + description = '' Relative offer fee you wish to receive based on a cj's amount. ''; }; cjfee_factor = mkOption { type = types.float; default = 0.1; - description = mdDoc '' + description = '' Variance around the average cj fee. ''; }; txfee = mkOption { type = types.ints.unsigned; default = 100; - description = mdDoc '' + description = '' The average transaction fee you're adding to coinjoin transactions. ''; }; txfee_contribution_factor = mkOption { type = types.float; default = 0.3; - description = mdDoc '' + description = '' Variance around the average tx fee. ''; }; minsize = mkOption { type = types.ints.unsigned; default = 100000; - description = mdDoc '' + description = '' Minimum size of your cj offer in Satoshis. Lower cj amounts will be disregarded. ''; }; size_factor = mkOption { type = types.float; default = 0.1; - description = mdDoc '' + description = '' Variance around all offer sizes. ''; }; diff --git a/modules/lightning-loop.nix b/modules/lightning-loop.nix index ceab36cde..e84d7b9bd 100644 --- a/modules/lightning-loop.nix +++ b/modules/lightning-loop.nix @@ -7,45 +7,45 @@ let rpcAddress = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for gRPC connections."; + description = "Address to listen for gRPC connections."; }; rpcPort = mkOption { type = types.port; default = 11010; - description = mdDoc "Port to listen for gRPC connections."; + description = "Port to listen for gRPC connections."; }; restAddress = mkOption { type = types.str; default = cfg.rpcAddress; - description = mdDoc "Address to listen for REST connections."; + description = "Address to listen for REST connections."; }; restPort = mkOption { type = types.port; default = 8081; - description = mdDoc "Port to listen for REST connections."; + description = "Port to listen for REST connections."; }; package = mkOption { type = types.package; default = config.nix-bitcoin.pkgs.lightning-loop; defaultText = "config.nix-bitcoin.pkgs.lightning-loop"; - description = mdDoc "The package providing lightning-loop binaries."; + description = "The package providing lightning-loop binaries."; }; dataDir = mkOption { type = types.path; default = "/var/lib/lightning-loop"; - description = mdDoc "The data directory for lightning-loop."; + description = "The data directory for lightning-loop."; }; proxy = mkOption { type = types.nullOr types.str; default = if cfg.tor.proxy then config.nix-bitcoin.torClientAddressWithPort else null; - description = mdDoc "`host:port` of SOCKS5 proxy for connnecting to the loop server."; + description = "`host:port` of SOCKS5 proxy for connnecting to the loop server."; }; certificate = { extraIPs = mkOption { type = with types; listOf str; default = []; example = [ "60.100.0.1" ]; - description = mdDoc '' + description = '' Extra `subjectAltName` IPs added to the certificate. This works the same as loop option {option}`tlsextraip`. ''; @@ -54,7 +54,7 @@ let type = with types; listOf str; default = []; example = [ "example.com" ]; - description = mdDoc '' + description = '' Extra `subjectAltName` domain names added to the certificate. This works the same as loop option {option}`tlsextradomain`. ''; @@ -66,7 +66,7 @@ let example = '' debuglevel=trace ''; - description = mdDoc '' + description = '' Extra lines appended to the configuration file. See here for all available options: https://github.com/lightninglabs/loop/blob/11ab596080e9d36f1df43edbeba0702b25aa7457/loopd/config.go#L119 @@ -80,7 +80,7 @@ let --tlscertpath '${secretsDir}/loop-cert' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary to connect with the lightning-loop instance."; + description = "Binary to connect with the lightning-loop instance."; }; tor = nbLib.tor; }; diff --git a/modules/lightning-pool.nix b/modules/lightning-pool.nix index d7ceb9d1d..32066568a 100644 --- a/modules/lightning-pool.nix +++ b/modules/lightning-pool.nix @@ -7,38 +7,38 @@ let rpcAddress = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for gRPC connections."; + description = "Address to listen for gRPC connections."; }; rpcPort = mkOption { type = types.port; default = 12010; - description = mdDoc "Port to listen for gRPC connections."; + description = "Port to listen for gRPC connections."; }; restAddress = mkOption { type = types.str; default = cfg.rpcAddress; - description = mdDoc "Address to listen for REST connections."; + description = "Address to listen for REST connections."; }; restPort = mkOption { type = types.port; default = 8281; - description = mdDoc "Port to listen for REST connections."; + description = "Port to listen for REST connections."; }; package = mkOption { type = types.package; default = config.nix-bitcoin.pkgs.lightning-pool; defaultText = "config.nix-bitcoin.pkgs.lightning-pool"; - description = mdDoc "The package providing lightning-pool binaries."; + description = "The package providing lightning-pool binaries."; }; dataDir = mkOption { type = types.path; default = "/var/lib/lightning-pool"; - description = mdDoc "The data directory for lightning-pool."; + description = "The data directory for lightning-pool."; }; proxy = mkOption { type = types.nullOr types.str; default = if cfg.tor.proxy then config.nix-bitcoin.torClientAddressWithPort else null; - description = mdDoc "host:port of SOCKS5 proxy for connnecting to the pool auction server."; + description = "host:port of SOCKS5 proxy for connnecting to the pool auction server."; }; extraConfig = mkOption { type = types.lines; @@ -46,7 +46,7 @@ let example = '' debuglevel=trace ''; - description = mdDoc "Extra lines appended to the configuration file."; + description = "Extra lines appended to the configuration file."; }; cli = mkOption { default = pkgs.writers.writeBashBin "pool" '' @@ -56,7 +56,7 @@ let --basedir '${cfg.dataDir}' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary to connect with the lightning-pool instance."; + description = "Binary to connect with the lightning-pool instance."; }; tor = nbLib.tor; }; diff --git a/modules/liquid.nix b/modules/liquid.nix index 1ad6c5c40..d1daa3380 100644 --- a/modules/liquid.nix +++ b/modules/liquid.nix @@ -8,19 +8,19 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for peer connections."; + description = "Address to listen for peer connections."; }; port = mkOption { type = types.port; default = 7042; - description = mdDoc "Override the default port on which to listen for connections."; + description = "Override the default port on which to listen for connections."; }; onionPort = mkOption { type = types.nullOr types.port; # When the liquidd onion service is enabled, add an onion-tagged socket # to distinguish local connections from Tor connections default = if (config.nix-bitcoin.onionServices.liquidd.enable or false) then 7043 else null; - description = mdDoc '' + description = '' Port to listen for Tor peer connections. If set, inbound connections to this port are tagged as onion peers. ''; @@ -28,7 +28,7 @@ let listen = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Listen for peer connections at `address:port` and `address:onionPort` (if {option}`onionPort` is set). ''; @@ -36,7 +36,7 @@ let listenWhitelisted = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Listen for peer connections at `address:whitelistedPort`. Peers connected through this socket are automatically whitelisted. ''; @@ -44,7 +44,7 @@ let whitelistedPort = mkOption { type = types.port; default = 7044; - description = mdDoc "See {option}`listenWhitelisted`."; + description = "See {option}`listenWhitelisted`."; }; extraConfig = mkOption { type = types.lines; @@ -54,23 +54,23 @@ let rpcthreads=16 logips=1 ''; - description = mdDoc "Extra lines appended to {file}`elements.conf`."; + description = "Extra lines appended to {file}`elements.conf`."; }; dataDir = mkOption { type = types.path; default = "/var/lib/liquidd"; - description = mdDoc "The data directory for liquidd."; + description = "The data directory for liquidd."; }; rpc = { address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for JSON-RPC connections."; + description = "Address to listen for JSON-RPC connections."; }; port = mkOption { type = types.port; default = 7041; - description = mdDoc "Port to listen for JSON-RPC connections."; + description = "Port to listen for JSON-RPC connections."; }; users = mkOption { default = {}; @@ -79,7 +79,7 @@ let bob.passwordHMAC = "b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99"; }; type = with types; attrsOf (submodule rpcUserOpts); - description = mdDoc '' + description = '' RPC user information for JSON-RPC connections. ''; }; @@ -87,25 +87,25 @@ let rpcallowip = mkOption { type = types.listOf types.str; default = [ "127.0.0.1" ]; - description = mdDoc '' + description = '' Allow JSON-RPC connections from specified source. ''; }; rpcuser = mkOption { type = types.str; default = "liquidrpc"; - description = mdDoc "Username for JSON-RPC connections"; + description = "Username for JSON-RPC connections"; }; proxy = mkOption { type = types.nullOr types.str; default = if cfg.tor.proxy then config.nix-bitcoin.torClientAddressWithPort else null; - description = mdDoc "Connect through SOCKS5 proxy"; + description = "Connect through SOCKS5 proxy"; }; dbCache = mkOption { type = types.nullOr (types.ints.between 4 16384); default = null; example = 4000; - description = mdDoc "Override the default database cache size in megabytes."; + description = "Override the default database cache size in megabytes."; }; prune = mkOption { type = types.nullOr (types.coercedTo @@ -115,7 +115,7 @@ let ); default = null; example = 10000; - description = mdDoc '' + description = '' Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a @@ -129,19 +129,19 @@ let validatepegin = mkOption { type = types.nullOr types.bool; default = null; - description = mdDoc '' + description = '' Validate pegin claims. All functionaries must run this. ''; }; user = mkOption { type = types.str; default = "liquid"; - description = mdDoc "The user as which to run liquidd."; + description = "The user as which to run liquidd."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run liquidd."; + description = "The group as which to run liquidd."; }; cli = mkOption { readOnly = true; @@ -149,14 +149,14 @@ let ${nbPkgs.elementsd}/bin/elements-cli -datadir='${cfg.dataDir}' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary to connect with the liquidd instance."; + description = "Binary to connect with the liquidd instance."; }; swapCli = mkOption { default = pkgs.writers.writeBashBin "liquidswap-cli" '' ${nbPkgs.liquid-swap}/bin/liquidswap-cli -c '${cfg.dataDir}/elements.conf' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary for managing liquid swaps."; + description = "Binary for managing liquid swaps."; }; tor = nbLib.tor; }; @@ -215,14 +215,14 @@ let name = mkOption { type = types.str; example = "alice"; - description = mdDoc '' + description = '' Username for JSON-RPC connections. ''; }; passwordHMAC = mkOption { type = with types; uniq (strMatching "[0-9a-f]+\\$[0-9a-f]{64}"); example = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae"; - description = mdDoc '' + description = '' Password HMAC-SHA-256 for JSON-RPC connections. Must be a string of the format `$`. ''; diff --git a/modules/lnd.nix b/modules/lnd.nix index c2b9c085c..78dadb763 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -7,47 +7,47 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for peer connections"; + description = "Address to listen for peer connections"; }; port = mkOption { type = types.port; default = 9735; - description = mdDoc "Port to listen for peer connections"; + description = "Port to listen for peer connections"; }; rpcAddress = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for RPC connections."; + description = "Address to listen for RPC connections."; }; rpcPort = mkOption { type = types.port; default = 10009; - description = mdDoc "Port to listen for gRPC connections."; + description = "Port to listen for gRPC connections."; }; restAddress = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Address to listen for REST connections."; + description = "Address to listen for REST connections."; }; restPort = mkOption { type = types.port; default = 8080; - description = mdDoc "Port to listen for REST connections."; + description = "Port to listen for REST connections."; }; dataDir = mkOption { type = types.path; default = "/var/lib/lnd"; - description = mdDoc "The data directory for LND."; + description = "The data directory for LND."; }; networkDir = mkOption { readOnly = true; default = "${cfg.dataDir}/chain/bitcoin/${bitcoind.network}"; - description = mdDoc "The network data directory."; + description = "The network data directory."; }; tor-socks = mkOption { type = types.nullOr types.str; default = if cfg.tor.proxy then config.nix-bitcoin.torClientAddressWithPort else null; - description = mdDoc "Socks proxy for connecting to Tor nodes"; + description = "Socks proxy for connecting to Tor nodes"; }; macaroons = mkOption { default = {}; @@ -55,18 +55,18 @@ let options = { user = mkOption { type = types.str; - description = mdDoc "User who owns the macaroon."; + description = "User who owns the macaroon."; }; permissions = mkOption { type = types.str; example = '' {"entity":"info","action":"read"},{"entity":"onchain","action":"read"} ''; - description = mdDoc "List of granted macaroon permissions."; + description = "List of granted macaroon permissions."; }; }; }); - description = mdDoc '' + description = '' Extra macaroon definitions. ''; }; @@ -75,7 +75,7 @@ let type = with types; listOf str; default = []; example = [ "60.100.0.1" ]; - description = mdDoc '' + description = '' Extra `subjectAltName` IPs added to the certificate. This works the same as lnd option {option}`tlsextraip`. ''; @@ -84,7 +84,7 @@ let type = with types; listOf str; default = []; example = [ "example.com" ]; - description = mdDoc '' + description = '' Extra `subjectAltName` domain names added to the certificate. This works the same as lnd option {option}`tlsextradomain`. ''; @@ -96,7 +96,7 @@ let example = '' autopilot.active=1 ''; - description = mdDoc '' + description = '' Extra lines appended to {file}`lnd.conf`. See here for all available options: https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf @@ -106,7 +106,7 @@ let type = types.package; default = config.nix-bitcoin.pkgs.lnd; defaultText = "config.nix-bitcoin.pkgs.lnd"; - description = mdDoc "The package providing lnd binaries."; + description = "The package providing lnd binaries."; }; cli = mkOption { default = pkgs.writers.writeBashBin "lncli" @@ -118,12 +118,12 @@ let --macaroonpath '${networkDir}/admin.macaroon' "$@" ''; defaultText = "(See source)"; - description = mdDoc "Binary to connect with the lnd instance."; + description = "Binary to connect with the lnd instance."; }; getPublicAddressCmd = mkOption { type = types.str; default = ""; - description = mdDoc '' + description = '' Bash expression which outputs the public service address to announce to peers. If left empty, no address is announced. ''; @@ -131,17 +131,17 @@ let user = mkOption { type = types.str; default = "lnd"; - description = mdDoc "The user as which to run LND."; + description = "The user as which to run LND."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run LND."; + description = "The group as which to run LND."; }; certPath = mkOption { readOnly = true; default = "${secretsDir}/lnd-cert"; - description = mdDoc "LND TLS certificate path."; + description = "LND TLS certificate path."; }; tor = nbLib.tor; }; diff --git a/modules/lndconnect.nix b/modules/lndconnect.nix index bc39ab8b2..4a547821c 100644 --- a/modules/lndconnect.nix +++ b/modules/lndconnect.nix @@ -7,7 +7,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Add a `lndconnect` binary to the system environment which prints connection info for lnd clients. See: https://github.com/LN-Zap/lndconnect @@ -25,7 +25,7 @@ let onion = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Create an onion service for the lnd REST server, which is used by lndconnect. ''; @@ -37,7 +37,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Add a `lndconnect-clightning` binary to the system environment which prints connection info for clightning clients. See: https://github.com/LN-Zap/lndconnect @@ -55,7 +55,7 @@ let onion = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Create an onion service for the clightning REST server, which is used by lndconnect. ''; @@ -65,7 +65,7 @@ let nix-bitcoin.mkLndconnect = mkOption { readOnly = true; default = mkLndconnect; - description = mdDoc '' + description = '' A function to create a lndconnect binary. See the source for further details. ''; diff --git a/modules/mempool.nix b/modules/mempool.nix index 422f2196d..fc9af106c 100644 --- a/modules/mempool.nix +++ b/modules/mempool.nix @@ -7,7 +7,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Enable Mempool, a fully featured Bitcoin visualizer, explorer, and API service. Note: Mempool enables `txindex` in bitcoind (this is a requirement). @@ -25,7 +25,7 @@ let enable = mkOption { type = types.bool; default = cfg.enable; - description = mdDoc '' + description = '' Enable the mempool frontend (web interface). This starts a simple nginx instance, configured for local usage with settings similar to the `mempool/frontend` Docker image. @@ -43,18 +43,18 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "HTTP server address."; + description = "HTTP server address."; }; port = mkOption { type = types.port; default = 60845; # A random private port - description = mdDoc "HTTP server port."; + description = "HTTP server port."; }; staticContentRoot = mkOption { type = types.path; default = nbPkgs.mempool-frontend; defaultText = "config.nix-bitcoin.pkgs.mempool-frontend"; - description = mdDoc " + description = " Path of the static frontend content root. "; }; @@ -62,7 +62,7 @@ let readOnly = true; default = frontend.nginxConfig; defaultText = "(See source)"; - description = mdDoc " + description = " An attrset of nginx config snippets for assembling a custom mempool nginx config. For details, see the source comments at the point of definition. @@ -73,17 +73,17 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "Mempool backend address."; + description = "Mempool backend address."; }; port = mkOption { type = types.port; default = 8999; - description = mdDoc "Mempool backend port."; + description = "Mempool backend port."; }; electrumServer = mkOption { type = types.enum [ "electrs" "fulcrum" ]; default = "electrs"; - description = mdDoc '' + description = '' The Electrum server to use for fetching address information. Possible options: @@ -104,7 +104,7 @@ let CLEARNET_URL = "https://myserver.org/prices"; }; }; - description = mdDoc '' + description = '' Mempool backend settings. See here for possible options: https://github.com/mempool/mempool/blob/master/backend/src/config.ts @@ -114,24 +114,24 @@ let name = mkOption { type = types.str; default = "mempool"; - description = mdDoc "Database name."; + description = "Database name."; }; }; package = mkOption { type = types.package; default = nbPkgs.mempool-backend; defaultText = "config.nix-bitcoin.pkgs.mempool-backend"; - description = mdDoc "The package providing mempool binaries."; + description = "The package providing mempool binaries."; }; user = mkOption { type = types.str; default = "mempool"; - description = mdDoc "The user as which to run Mempool."; + description = "The user as which to run Mempool."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run Mempool."; + description = "The group as which to run Mempool."; }; tor = nbLib.tor; }; diff --git a/modules/netns-isolation.nix b/modules/netns-isolation.nix index 832bb9444..47b59dd62 100644 --- a/modules/netns-isolation.nix +++ b/modules/netns-isolation.nix @@ -8,7 +8,7 @@ let addressblock = mkOption { type = types.ints.u8; default = 1; - description = mdDoc '' + description = '' The address block N in 169.254.N.0/24, used as the prefix for netns addresses. ''; }; @@ -20,7 +20,7 @@ let id = mkOption { # TODO: Assert uniqueness type = types.ints.between 11 255; - description = mdDoc '' + description = '' id for the netns, used for the IP address host part and for naming the interfaces. Must be unique. Must be greater than 10. ''; @@ -35,7 +35,7 @@ let allowedUser = mkOption { type = types.str; - description = mdDoc '' + description = '' User that is allowed to execute commands in the service network namespaces. The user's group is also authorized. ''; @@ -45,13 +45,13 @@ let netns = mkOption { readOnly = true; default = netns; - description = mdDoc "Exposes netns parameters."; + description = "Exposes netns parameters."; }; bridgeIp = mkOption { readOnly = true; default = bridgeIp; - description = mdDoc "IP of the netns bridge interface."; + description = "IP of the netns bridge interface."; }; }; diff --git a/modules/nodeinfo.nix b/modules/nodeinfo.nix index f219664ff..bce9ff01d 100644 --- a/modules/nodeinfo.nix +++ b/modules/nodeinfo.nix @@ -17,7 +17,7 @@ let type = types.attrs; default = {}; defaultText = "(See source)"; - description = mdDoc '' + description = '' Nodeinfo service definitions. ''; }; @@ -27,7 +27,7 @@ let readOnly = true; default = nodeinfoLib; defaultText = "(See source)"; - description = mdDoc '' + description = '' Helper functions for defining nodeinfo services. ''; }; diff --git a/modules/onion-addresses.nix b/modules/onion-addresses.nix index cff564fc5..85193befb 100644 --- a/modules/onion-addresses.nix +++ b/modules/onion-addresses.nix @@ -12,7 +12,7 @@ let access = mkOption { type = with types; attrsOf (listOf str); default = {}; - description = mdDoc '' + description = '' This option controls who is allowed to access onion addresses. For example, the following allows user 'myuser' to access bitcoind and clightning onion addresses: @@ -28,7 +28,7 @@ let services = mkOption { type = with types; listOf str; default = []; - description = mdDoc '' + description = '' Services that can access their onion address via file {file}`/var/lib/onion-addresses/` The file is readable only by the service user. diff --git a/modules/onion-services.nix b/modules/onion-services.nix index 6341869d9..716ebb519 100644 --- a/modules/onion-services.nix +++ b/modules/onion-services.nix @@ -16,7 +16,7 @@ let enable = mkOption { type = types.bool; default = config.public; - description = mdDoc '' + description = '' Create an onion service for the given service. The service must define options {option}`address` and {option}`onionPort` (or `port`). ''; @@ -24,7 +24,7 @@ let public = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Make the onion address accessible to the service. If enabled, the onion service is automatically enabled. Only available for services that define option {option}`getPublicAddressCmd`. @@ -33,7 +33,7 @@ let externalPort = mkOption { type = types.nullOr types.port; default = null; - description = mdDoc "Override the external port of the onion service."; + description = "Override the external port of the onion service."; }; }; } diff --git a/modules/operator.nix b/modules/operator.nix index ff86d1aac..173d2a4b8 100644 --- a/modules/operator.nix +++ b/modules/operator.nix @@ -6,7 +6,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Whether to define a user named `operator` for convenient interactive access to nix-bitcoin features (like `bitcoin-cli`). @@ -18,17 +18,17 @@ let name = mkOption { type = types.str; default = "operator"; - description = mdDoc "Name of the operator user."; + description = "Name of the operator user."; }; groups = mkOption { type = with types; listOf str; default = []; - description = mdDoc "Extra groups of the operatur user."; + description = "Extra groups of the operatur user."; }; allowRunAsUsers = mkOption { type = with types; listOf str; default = []; - description = mdDoc "Users as which the operator is allowed to run commands."; + description = "Users as which the operator is allowed to run commands."; }; }; diff --git a/modules/presets/wireguard.nix b/modules/presets/wireguard.nix index ccf64feee..4a04b2897 100644 --- a/modules/presets/wireguard.nix +++ b/modules/presets/wireguard.nix @@ -17,12 +17,12 @@ let subnet = mkOption { type = types.str; default = "10.10.0"; - description = mdDoc "The /24 subnet of the wireguard network."; + description = "The /24 subnet of the wireguard network."; }; restrictPeer = mkOption { type = types.bool; default = true; - description = mdDoc '' + description = '' Prevent the peer from connecting to any addresses except for the WireGuard server address. ''; }; diff --git a/modules/rtl.nix b/modules/rtl.nix index 73e9cf071..66c917948 100644 --- a/modules/rtl.nix +++ b/modules/rtl.nix @@ -7,24 +7,24 @@ let address = mkOption { type = types.str; default = "127.0.0.1"; - description = mdDoc "HTTP server address."; + description = "HTTP server address."; }; port = mkOption { type = types.port; default = 3000; - description = mdDoc "HTTP server port."; + description = "HTTP server port."; }; dataDir = mkOption { type = types.path; default = "/var/lib/rtl"; - description = mdDoc "The data directory for RTL."; + description = "The data directory for RTL."; }; nodes = { clightning = { enable = mkOption { type = types.bool; default = false; - description = mdDoc "Enable the clightning node interface."; + description = "Enable the clightning node interface."; }; extraConfig = mkOption { type = with types; attrsOf anything; @@ -33,7 +33,7 @@ let Settings.userPersona = "MERCHANT"; Settings.logLevel = "DEBUG"; }; - description = mdDoc '' + description = '' Extra clightning node configuration. See here for all available options: https://github.com/Ride-The-Lightning/RTL/blob/master/.github/docs/Application_configurations.md @@ -44,12 +44,12 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc "Enable the lnd node interface."; + description = "Enable the lnd node interface."; }; loop = mkOption { type = types.bool; default = false; - description = mdDoc "Enable swaps with lightning-loop."; + description = "Enable swaps with lightning-loop."; }; extraConfig = mkOption { type = with types; attrsOf anything; @@ -58,7 +58,7 @@ let Settings.userPersona = "MERCHANT"; Settings.logLevel = "DEBUG"; }; - description = mdDoc '' + description = '' Extra lnd node configuration. See here for all available options: https://github.com/Ride-The-Lightning/RTL/blob/master/.github/docs/Application_configurations.md @@ -68,7 +68,7 @@ let reverseOrder = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Reverse the order of nodes shown in the UI. By default, clightning is shown before lnd. ''; @@ -77,13 +77,13 @@ let nightTheme = mkOption { type = types.bool; default = false; - description = mdDoc "Enable the Night UI Theme."; + description = "Enable the Night UI Theme."; }; extraCurrency = mkOption { type = with types; nullOr str; default = null; example = "USD"; - description = mdDoc '' + description = '' Currency code (ISO 4217) of the extra currency used for displaying balances. When set, this option enables online currency rate fetching. Warning: Rate fetching requires outgoing clearnet connections, so option @@ -93,12 +93,12 @@ let user = mkOption { type = types.str; default = "rtl"; - description = mdDoc "The user as which to run RTL."; + description = "The user as which to run RTL."; }; group = mkOption { type = types.str; default = cfg.user; - description = mdDoc "The group as which to run RTL."; + description = "The group as which to run RTL."; }; tor.enforce = nbLib.tor.enforce; }; diff --git a/modules/secrets/secrets.nix b/modules/secrets/secrets.nix index 55540d310..944c92be0 100644 --- a/modules/secrets/secrets.nix +++ b/modules/secrets/secrets.nix @@ -6,13 +6,13 @@ let secretsDir = mkOption { type = types.path; default = "/etc/nix-bitcoin-secrets"; - description = mdDoc "Directory to store secrets"; + description = "Directory to store secrets"; }; setupSecrets = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Set permissions for existing secrets in {option}`nix-bitcoin.secretsDir` before services are started. ''; @@ -21,7 +21,7 @@ let generateSecrets = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Automatically generate all required secrets before services are started. Note: Make sure to create a backup of the generated secrets. ''; @@ -30,7 +30,7 @@ let generateSecretsCmds = mkOption { type = types.attrsOf types.lines; default = {}; - description = mdDoc '' + description = '' Bash expressions for generating secrets. ''; }; @@ -38,7 +38,7 @@ let # Currently, this is used only by ../deployment/nixops.nix deployment.secretsDir = mkOption { type = types.path; - description = mdDoc '' + description = '' Directory of local secrets that are transferred to the nix-bitcoin node on deployment ''; }; diff --git a/modules/security.nix b/modules/security.nix index 612f94d19..338d82aa3 100644 --- a/modules/security.nix +++ b/modules/security.nix @@ -6,7 +6,7 @@ with lib; nix-bitcoin.security.dbusHideProcessInformation = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Only allow users with group `proc` to retrieve systemd unit information like cgroup paths (i.e. (sub)process command lines) via D-Bus. diff --git a/modules/versioning.nix b/modules/versioning.nix index 4d6a2a876..847670938 100644 --- a/modules/versioning.nix +++ b/modules/versioning.nix @@ -12,7 +12,7 @@ let type = with types; nullOr str; default = null; example = "0.0.92"; - description = mdDoc '' + description = '' The nix-bitcoin release version that your config is compatible with. When upgrading to a backwards-incompatible release, nix-bitcoin will throw an diff --git a/pkgs/pinned.nix b/pkgs/pinned.nix index f8a8d95f2..9f59bc069 100644 --- a/pkgs/pinned.nix +++ b/pkgs/pinned.nix @@ -2,23 +2,23 @@ pkgs: pkgsUnstable: { inherit (pkgs) - charge-lnd - extra-container - lightning-loop - lightning-pool - lndconnect; - - inherit (pkgsUnstable) bitcoin bitcoind btcpayserver + charge-lnd clightning electrs elementsd - fulcrum + extra-container hwi - lnd + lightning-loop + lightning-pool + lndconnect nbxplorer; + inherit (pkgsUnstable) + fulcrum + lnd; + inherit pkgs pkgsUnstable; } diff --git a/pkgs/python-packages/bencoderpyx/default.nix b/pkgs/python-packages/bencoderpyx/default.nix index afbe399ff..d71dc31b6 100644 --- a/pkgs/python-packages/bencoderpyx/default.nix +++ b/pkgs/python-packages/bencoderpyx/default.nix @@ -1,6 +1,6 @@ -{ lib, buildPythonPackageWithDepsCheck, fetchurl, cython, pytest, coverage }: +{ lib, buildPythonPackage, fetchurl, cython, pytest, coverage }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "bencoder.pyx"; version = "3.0.1"; diff --git a/pkgs/python-packages/chromalog/default.nix b/pkgs/python-packages/chromalog/default.nix index 4aaedbfaa..80739f629 100644 --- a/pkgs/python-packages/chromalog/default.nix +++ b/pkgs/python-packages/chromalog/default.nix @@ -1,5 +1,5 @@ -{ lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, colorama, future, six }: -buildPythonPackageWithDepsCheck rec { +{ lib, buildPythonPackage, fetchFromGitHub, colorama, future, six }: +buildPythonPackage rec { pname = "chromalog"; version = "1.0.5"; diff --git a/pkgs/python-packages/default.nix b/pkgs/python-packages/default.nix index b984f4e7f..356e8e2a2 100644 --- a/pkgs/python-packages/default.nix +++ b/pkgs/python-packages/default.nix @@ -25,17 +25,6 @@ rec { # autobahn 20.12.3, required by joinmarketclient autobahn = callPackage ./specific-versions/autobahn.nix {}; - - # A version of `buildPythonPackage` which checks that Python package - # requirements are met. - # This was the case for NixOS <= 23.05. - # TODO-EXTERNAL: Remove when this is resolved: - # https://github.com/NixOS/nixpkgs/issues/253131 - buildPythonPackageWithDepsCheck = attrs: - self.buildPythonPackage (attrs // { - dontUsePypaInstall = true; - nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [ self.pipInstallHook ]; - }); }; nbPython3Packages = (python3.override { diff --git a/pkgs/python-packages/joinmarket/default.nix b/pkgs/python-packages/joinmarket/default.nix index 3f4b009a4..854f1e536 100644 --- a/pkgs/python-packages/joinmarket/default.nix +++ b/pkgs/python-packages/joinmarket/default.nix @@ -1,7 +1,7 @@ { version , src , lib -, buildPythonPackageWithDepsCheck +, buildPythonPackage , pythonOlder , pythonAtLeast , pytestCheckHook @@ -24,7 +24,7 @@ , pyopenssl }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "joinmarket"; inherit version src; format = "pyproject"; @@ -62,12 +62,22 @@ buildPythonPackageWithDepsCheck rec { pyopenssl ]; + # TODO-EXTERNAL: + # Remove this when fixed upstream. + # + # Fix the following error during checkPhase: + # File "/nix/store/...-python3.11-pytest-8.1.1/lib/python3.11/site-packages/_pytest/config/argparsing.py", line 133, in _getparser + # arggroup.add_argument(*n, **a) + # File "/nix/store/...-python3-3.11.9/lib/python3.11/argparse.py", line 1460, in add_argument + # raise ValueError('%r is not callable' % (type_func,)) + # ValueError: 'int' is not callable + patches = [ ./fix-conftest-arg-type-error.patch ]; + postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail 'txtorcon==23.11.0' 'txtorcon==23.5.0' \ - --replace-fail 'twisted==23.10.0' 'twisted==23.8.0' \ - --replace-fail 'service-identity==21.1.0' 'service-identity==23.1.0' \ - --replace-fail 'cryptography==41.0.6' 'cryptography==41.0.3' + --replace-fail 'twisted==23.10.0' 'twisted==24.3.0' \ + --replace-fail 'service-identity==21.1.0' 'service-identity==24.1.0' \ + --replace-fail 'cryptography==41.0.6' 'cryptography==42.0.5' # Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'. sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml diff --git a/pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch b/pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch new file mode 100644 index 000000000..a8f274377 --- /dev/null +++ b/pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch @@ -0,0 +1,17 @@ +diff --git a/conftest.py b/conftest.py +index 1cc56d5..54b0a4c 100644 +--- a/conftest.py ++++ b/conftest.py +@@ -74,12 +74,6 @@ def pytest_addoption(parser: Any) -> None: + action="store", + default='bitcoinrpc', + help="the RPC username for your test bitcoin instance (default=bitcoinrpc)") +- parser.addoption("--nirc", +- type="int", +- action="store", +- default=1, +- help="the number of local miniircd instances") +- + + @pytest.fixture(scope="session", autouse=True) + def setup_early_if_needed(request) -> None: diff --git a/pkgs/python-packages/pylightning/default.nix b/pkgs/python-packages/pylightning/default.nix index a646c1e55..2c4b59c00 100644 --- a/pkgs/python-packages/pylightning/default.nix +++ b/pkgs/python-packages/pylightning/default.nix @@ -1,6 +1,6 @@ -{ buildPythonPackageWithDepsCheck, clightning, pyln-client }: +{ buildPythonPackage, clightning, pyln-client }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "pylightning"; version = "0.10.1"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py diff --git a/pkgs/python-packages/pyln-bolt7/default.nix b/pkgs/python-packages/pyln-bolt7/default.nix index 140799ee3..16bf920c2 100644 --- a/pkgs/python-packages/pyln-bolt7/default.nix +++ b/pkgs/python-packages/pyln-bolt7/default.nix @@ -1,6 +1,6 @@ -{ buildPythonPackageWithDepsCheck, poetry-core, pytestCheckHook, clightning, pyln-proto }: +{ buildPythonPackage, poetry-core, pytestCheckHook, clightning, pyln-proto }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "pyln-bolt7"; # The version is defined here: # https://github.com/ElementsProject/lightning/blob/master/contrib/pyln-spec/bolt7/pyproject.toml diff --git a/pkgs/python-packages/pyln-client/default.nix b/pkgs/python-packages/pyln-client/default.nix index 872aaf804..99e1a2c42 100644 --- a/pkgs/python-packages/pyln-client/default.nix +++ b/pkgs/python-packages/pyln-client/default.nix @@ -1,6 +1,6 @@ -{ buildPythonPackageWithDepsCheck, poetry-core, pytestCheckHook, clightning, pyln-bolt7, pyln-proto }: +{ buildPythonPackage, poetry-core, pytestCheckHook, clightning, pyln-bolt7, pyln-proto }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "pyln-client"; version = clightning.version; format = "pyproject"; diff --git a/pkgs/python-packages/pyln-proto/default.nix b/pkgs/python-packages/pyln-proto/default.nix index 6d3b1facb..32bc24894 100644 --- a/pkgs/python-packages/pyln-proto/default.nix +++ b/pkgs/python-packages/pyln-proto/default.nix @@ -1,4 +1,4 @@ -{ buildPythonPackageWithDepsCheck +{ buildPythonPackage , clightning , poetry-core , pytestCheckHook @@ -9,7 +9,7 @@ , pysocks }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "pyln-proto"; version = clightning.version; format = "pyproject"; @@ -29,4 +29,10 @@ buildPythonPackageWithDepsCheck rec { checkInputs = [ pytestCheckHook ]; postUnpack = "sourceRoot=$sourceRoot/contrib/pyln-proto"; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'coincurve = "^18"' 'coincurve = "^19"' \ + --replace-fail 'cryptography = "^41"' 'cryptography = "^42"' \ + ''; } diff --git a/pkgs/python-packages/python-bitcointx/default.nix b/pkgs/python-packages/python-bitcointx/default.nix index ddee304db..7f42ef21e 100644 --- a/pkgs/python-packages/python-bitcointx/default.nix +++ b/pkgs/python-packages/python-bitcointx/default.nix @@ -1,6 +1,6 @@ -{ lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, secp256k1 }: +{ lib, buildPythonPackage, fetchFromGitHub, secp256k1 }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "python-bitcointx"; version = "1.1.5"; diff --git a/pkgs/python-packages/runes/default.nix b/pkgs/python-packages/runes/default.nix index 46a564240..125c0bb07 100644 --- a/pkgs/python-packages/runes/default.nix +++ b/pkgs/python-packages/runes/default.nix @@ -1,6 +1,6 @@ -{ sha256, lib, buildPythonPackageWithDepsCheck, fetchFromGitHub }: +{ sha256, lib, buildPythonPackage, fetchFromGitHub }: -buildPythonPackageWithDepsCheck { +buildPythonPackage { pname = "runes"; version = "0.4.0"; diff --git a/pkgs/python-packages/sha256/default.nix b/pkgs/python-packages/sha256/default.nix index 73ec24cbe..50fd0c7cf 100644 --- a/pkgs/python-packages/sha256/default.nix +++ b/pkgs/python-packages/sha256/default.nix @@ -1,6 +1,6 @@ -{ lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, cython }: +{ lib, buildPythonPackage, fetchFromGitHub, cython }: -buildPythonPackageWithDepsCheck rec { +buildPythonPackage rec { pname = "sha256"; version = builtins.substring 0 8 src.rev; diff --git a/pkgs/rtl/default.nix b/pkgs/rtl/default.nix index c9b3fd2e7..e11f61e6c 100644 --- a/pkgs/rtl/default.nix +++ b/pkgs/rtl/default.nix @@ -5,7 +5,6 @@ , fetchNodeModules , fetchpatch , fetchurl -, applyPatches , makeWrapper }: let self = stdenvNoCC.mkDerivation { diff --git a/test/lib/shellcheck-services.nix b/test/lib/shellcheck-services.nix index 14e1d025f..f81e343fd 100644 --- a/test/lib/shellcheck-services.nix +++ b/test/lib/shellcheck-services.nix @@ -5,7 +5,7 @@ let enable = mkOption { type = types.bool; default = false; - description = mdDoc '' + description = '' Whether to shellcheck services during system build time. ''; }; @@ -13,14 +13,14 @@ let sourcePrefix = mkOption { type = with types; nullOr str; default = null; - description = mdDoc '' + description = '' The definition source path prefix of services to include in the shellcheck. ''; }; runShellcheck = mkOption { readOnly = true; - description = mdDoc '' + description = '' A derivation that runs shellcheck on all bash scripts included in nix-bitcoin services. ''; diff --git a/test/lib/test-lib.nix b/test/lib/test-lib.nix index 99c2ca5dd..125f640b1 100644 --- a/test/lib/test-lib.nix +++ b/test/lib/test-lib.nix @@ -10,7 +10,7 @@ with lib; noConnections = mkOption { type = types.bool; default = !config.test.container.enableWAN; - description = mdDoc '' + description = '' Whether services should be configured to not connect to external hosts. This can silence some warnings while running the test in an offline environment. ''; @@ -18,7 +18,7 @@ with lib; data = mkOption { type = types.attrs; default = {}; - description = mdDoc '' + description = '' Attrs that are available in the Python test script under the global dictionary variable {var}`test_data`. The data is exported via JSON. ''; diff --git a/test/nixos-search/ci-test.sh b/test/nixos-search/ci-test.sh index c4c70d173..1f2836141 100755 --- a/test/nixos-search/ci-test.sh +++ b/test/nixos-search/ci-test.sh @@ -3,17 +3,19 @@ set -euo pipefail cd "${BASH_SOURCE[0]%/*}" +nbFlake=$(realpath ../..) + # Use cachix to cache the `flake-info` build cachixCache=nix-bitcoin nix run .#cachix -- use "$cachixCache" -# We're running in a basic, unprivileged container that doesn't support sandboxing. -# Sandboxing is unnneeded because we're only building the 3rd-party `flake-info` tool. -echo "sandbox = false" >> /etc/nix/nix.conf - # shellcheck disable=SC2016 -PATH=$(nix shell -L .#flake-info .#cachix -c sh -c 'echo $PATH') +PATH=$(nix shell -L .#{flake-info,cachix,jq} -c sh -c 'echo $PATH') + +# flake-info uses `nixpkgs` from NIX_PATH +NIX_PATH="nixpkgs=$(nix flake metadata --json --inputs-from "$nbFlake" nixpkgs | jq -r .path)" +export NIX_PATH if [[ ${CACHIX_SIGNING_KEY:-} ]]; then cachix push "$cachixCache" "$(type -P flake-info)"; diff --git a/test/nixos-search/flake-info-sandboxed.sh b/test/nixos-search/flake-info-sandboxed.sh index 2bf6bb824..aeb819951 100755 --- a/test/nixos-search/flake-info-sandboxed.sh +++ b/test/nixos-search/flake-info-sandboxed.sh @@ -13,7 +13,11 @@ cd "${BASH_SOURCE[0]%/*}" nbFlake=$(realpath ../..) # shellcheck disable=SC2016 -PATH=$(nix shell -L .#{flake-info,bubblewrap} -c sh -c 'echo $PATH') +PATH=$(nix shell -L .#{flake-info,bubblewrap,jq} -c sh -c 'echo $PATH') + +# flake-info uses `nixpkgs` from NIX_PATH +NIX_PATH="nixpkgs=$(nix flake metadata --json --inputs-from "$nbFlake" nixpkgs | jq -r .path)" +export NIX_PATH tmpDir=$(mktemp -d /tmp/nix-bitcoin-flake-info.XXX) trap 'rm -rf $tmpDir' EXIT diff --git a/test/nixos-search/flake.lock b/test/nixos-search/flake.lock index 2c5f43469..890c39ffd 100644 --- a/test/nixos-search/flake.lock +++ b/test/nixos-search/flake.lock @@ -21,11 +21,11 @@ "nixos-infra": { "flake": false, "locked": { - "lastModified": 1719778568, - "narHash": "sha256-W9SPjBPAOGGzCU7SxhQ4VaQvm30GjEJfx+augFPwlEA=", + "lastModified": 1720869490, + "narHash": "sha256-Cj5h2zSCGTuIlbEWasB4aIBl8IEhdxq/JZX+vQmyffk=", "owner": "NixOS", "repo": "infra", - "rev": "dd2613701333234c5d1b84c7bc9cab907b712e77", + "rev": "0e4ddbf7943699b9d61bc6eaae9b2ef536ffeb5a", "type": "github" }, "original": { @@ -43,11 +43,11 @@ "npmlock2nix": "npmlock2nix" }, "locked": { - "lastModified": 1719923111, - "narHash": "sha256-4MhPR5FP6Jj+OoMek/RWpFUzvgTuUtYi8QRPK3GtVnw=", + "lastModified": 1721050729, + "narHash": "sha256-TTYT7WengNKlRWkQJMKuccB/MgYvNU0c59cpJEy6NOY=", "owner": "nixos", "repo": "nixos-search", - "rev": "6c6f9f5effdd20d1aa7bc6b9a01e20800d02a7bc", + "rev": "f46a52abf356365277c70268098772c6de5381b3", "type": "github" }, "original": { @@ -58,11 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719506693, - "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", "type": "github" }, "original": { diff --git a/test/nixos-search/flake.nix b/test/nixos-search/flake.nix index 8c462bcb9..a4e816f04 100644 --- a/test/nixos-search/flake.nix +++ b/test/nixos-search/flake.nix @@ -4,8 +4,24 @@ { inputs.nixos-search.url = "github:nixos/nixos-search"; - outputs = { self, nixos-search }: { - inherit (nixos-search) packages; + outputs = { self, nixos-search }: let + systems = [ + "x86_64-linux" + "aarch64-linux" + ]; + inherit (nixos-search.inputs.nixpkgs) lib; + in { + packages = lib.genAttrs systems (system: { + # In flake-info, Rust calls into Nix code which uses `nixpkgs` from NIX_PATH. + # Don't set `nixpkgs` to a tarball URL, use the default value from the environment instead. + # This allows running flake-info in an offline environment (./flake-info-sandboxed.sh). + flake-info = nixos-search.packages.${system}.flake-info.overrideAttrs (old: { + postPatch = (old.postPatch or "") + '' + substituteInPlace src/commands/nix_flake_attrs.rs --replace-fail \ + 'command.add_arg_pair("-I", "nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz");' "" + ''; + }); + }); # Used by ./ci-test.sh inherit (nixos-search.inputs.nixpkgs) legacyPackages; diff --git a/test/run-tests.sh b/test/run-tests.sh index d76f0a639..09caffeec 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -263,7 +263,7 @@ isNixVersionGreaterEqual_2_15() { } flake() { - nix flake check "$scriptDir/.." + nix flake check --all-systems "$scriptDir/.." } # Test generating module documentation for search.nixos.org diff --git a/test/tests.py b/test/tests.py index ef38b9de5..67cdce4fa 100644 --- a/test/tests.py +++ b/test/tests.py @@ -355,7 +355,7 @@ def _(): # Files in backup and /var/lib should be identical assert_matches( f"{run_duplicity} verify --archive-dir /var/lib/duplicity file:///var/lib/localBackups /var/lib", - "0 differences found", + "no sync needed", ) # Backup should include important files files = {