nix-bitcoin/modules
Erik Arvstedt 3681f118f7
nix-bitcoin.nix: add defaultText (automatic)
This enables generating module option documentation.

This commit was genereated by running the following script inside the
repo root dir:

def add_default_text(file)
  src = File.read(file)
  src2 = src.gsub(/( = mkOption\s+\{[^{]*?)(\n\s+default = )(.*?);$(.*?\})/m) do |str|
    pre, defaultVar, default, post = Regexp.last_match.captures
    replacement =
      if !post.include?('defaultText =')
        if default =~ /\bpkgs\b/
          defaultText = default.lines.length == 1 ? default : "(See source)"
          "#{pre}#{defaultVar}#{default};#{defaultVar.sub('default', 'defaultText')}#{defaultText.inspect};#{post}"
        end
      end
    replacement or str
  end
  File.write(file, src2) if src2 != src
end

Dir["modules/**/*.nix"].each do |f|
  next if File.basename(f) == "nix-bitcoin.nix"
  add_default_text f
end
2021-12-12 16:20:39 +01:00
..
clightning-plugins nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
deployment examples: add krops deployment method 2021-03-15 18:53:07 +01:00
presets hardened-extended: define kernelParams as separate strings 2021-12-10 12:16:31 +00:00
secrets secrets: use assertion instead of error in default value 2021-12-11 13:27:48 +01:00
backups.nix backups: allow extraFiles to override default settings 2021-10-06 11:27:52 +02:00
banlist.cli.txt banlist: update to newest version 2020-06-11 09:23:26 +00:00
bitcoind-rpc-public-whitelist.nix bitcoind-rpc-public-whitelist: remove waitfornewblock 2021-11-02 17:40:43 +01:00
bitcoind.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
btcpayserver.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
charge-lnd.nix services: support 0.0.0.0/:: in address options 2021-10-04 00:33:26 +02:00
clightning.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
default.nix remove recurring-donations module 2021-11-28 21:18:39 +01:00
electrs.nix Merge fort-nix/nix-bitcoin#425: Misc. improvements 2021-11-29 18:05:19 +00:00
hardware-wallets.nix minor fixes 2021-12-07 15:35:33 +01:00
joinmarket-ob-watcher.nix services: add tor.* options 2021-11-29 13:22:43 +01:00
joinmarket.nix treewide: add defaultText (manual) 2021-12-12 16:18:14 +01:00
lightning-loop.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
lightning-pool.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
liquid.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
lnd-rest-onion-service.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
lnd.nix nix-bitcoin.nix: add defaultText (automatic) 2021-12-12 16:20:39 +01:00
modules.nix modules.nix: move rtl to fix topological sorting 2021-11-28 21:18:47 +01:00
netns-isolation.nix netns-isolation: add compatibility with 21.11 2021-12-10 12:16:09 +00:00
nix-bitcoin.nix treewide: add defaultText (manual) 2021-12-12 16:18:14 +01:00
nodeinfo.nix treewide: add defaultText (manual) 2021-12-12 16:18:14 +01:00
obsolete-options.nix services: add tor.* options 2021-11-29 13:22:43 +01:00
onion-addresses.nix onion-addresses: fix files not being copied 2021-11-29 13:22:43 +01:00
onion-services.nix rtl: add module 2021-11-09 14:13:42 +00:00
operator.nix modules: move options to the top 2021-09-13 13:41:47 +02:00
rtl.nix rtl: add option extraCurrency 2021-11-29 13:22:44 +01:00
security.nix security: update /proc restriction mechanism 2021-08-14 10:46:41 +02:00
spark-wallet.nix services: add tor.* options 2021-11-29 13:22:43 +01:00
versioning.nix versioning: move variable 2021-11-02 17:40:43 +01:00