From 757a66b9bd1784d9a20fce8cf04414f31f2c762d Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 14 Jan 2021 13:24:30 +0100 Subject: [PATCH] liquid: move rpcuser definition to module --- modules/liquid.nix | 6 +++--- modules/presets/secure-node.nix | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/liquid.nix b/modules/liquid.nix index 354e179..7158cf0 100644 --- a/modules/liquid.nix +++ b/modules/liquid.nix @@ -30,7 +30,7 @@ let rpcbind=${cfg.rpc.address} rpcconnect=${cfg.rpc.address} ${lib.concatMapStrings (rpcallowip: "rpcallowip=${rpcallowip}\n") cfg.rpcallowip} - ${optionalString (cfg.rpcuser != null) "rpcuser=${cfg.rpcuser}"} + rpcuser=${cfg.rpcuser} ${optionalString (cfg.rpcpassword != null) "rpcpassword=${cfg.rpcpassword}"} mainchainrpchost=${config.services.bitcoind.rpc.address} mainchainrpcport=${toString config.services.bitcoind.rpc.port} @@ -138,8 +138,8 @@ in { ''; }; rpcuser = mkOption { - type = types.nullOr types.str; - default = null; + type = types.str; + default = "liquidrpc"; description = "Username for JSON-RPC connections"; }; rpcpassword = mkOption { diff --git a/modules/presets/secure-node.nix b/modules/presets/secure-node.nix index 0b1e4b6..90a16ba 100644 --- a/modules/presets/secure-node.nix +++ b/modules/presets/secure-node.nix @@ -48,7 +48,6 @@ in { }; services.liquidd = { - rpcuser = "liquidrpc"; prune = 1000; validatepegin = true; listen = true;