From 017e08ca10d44d3e08b11de3c6c5613c89c5999c Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 26 Nov 2021 15:13:32 +0100 Subject: [PATCH] btcpayserver: move nbxplorer options to bottom These are largely irrelevant to end users. --- modules/btcpayserver.nix | 81 +++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/modules/btcpayserver.nix b/modules/btcpayserver.nix index 55b709a..a90c611 100644 --- a/modules/btcpayserver.nix +++ b/modules/btcpayserver.nix @@ -3,45 +3,6 @@ with lib; let options.services = { - nbxplorer = { - package = mkOption { - type = types.package; - default = nbPkgs.nbxplorer; - description = "The package providing nbxplorer binaries."; - }; - address = mkOption { - type = types.str; - default = "127.0.0.1"; - description = "Address to listen on."; - }; - port = mkOption { - type = types.port; - default = 24444; - description = "Port to listen on."; - }; - dataDir = mkOption { - type = types.path; - default = "/var/lib/nbxplorer"; - description = "The data directory for nbxplorer."; - }; - user = mkOption { - type = types.str; - default = "nbxplorer"; - description = "The user as which to run nbxplorer."; - }; - group = mkOption { - type = types.str; - default = cfg.nbxplorer.user; - description = "The group as which to run nbxplorer."; - }; - enable = mkOption { - # This option is only used by netns-isolation - internal = true; - default = cfg.btcpayserver.enable; - }; - enforceTor = nbLib.enforceTor; - }; - btcpayserver = { enable = mkEnableOption "btcpayserver"; address = mkOption { @@ -95,6 +56,48 @@ let }; enforceTor = nbLib.enforceTor; }; + + nbxplorer = { + enable = mkOption { + # This option is only used by netns-isolation + internal = true; + default = cfg.btcpayserver.enable; + description = '' + nbxplorer is always enabled when btcpayserver is enabled. + ''; + }; + package = mkOption { + type = types.package; + default = nbPkgs.nbxplorer; + description = "The package providing nbxplorer binaries."; + }; + address = mkOption { + type = types.str; + default = "127.0.0.1"; + description = "Address to listen on."; + }; + port = mkOption { + type = types.port; + default = 24444; + description = "Port to listen on."; + }; + dataDir = mkOption { + type = types.path; + default = "/var/lib/nbxplorer"; + description = "The data directory for nbxplorer."; + }; + user = mkOption { + type = types.str; + default = "nbxplorer"; + description = "The user as which to run nbxplorer."; + }; + group = mkOption { + type = types.str; + default = cfg.nbxplorer.user; + description = "The group as which to run nbxplorer."; + }; + enforceTor = nbLib.enforceTor; + }; }; cfg = config.services;