liquidd: use type str for rpcbind

This commit is contained in:
Erik Arvstedt 2020-10-29 21:20:34 +01:00
parent de23fdd377
commit e66636ef0e
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 5 additions and 5 deletions

View File

@ -26,8 +26,8 @@ let
(rpcUser: "rpcauth=${rpcUser.name}:${rpcUser.passwordHMAC}") (rpcUser: "rpcauth=${rpcUser.name}:${rpcUser.passwordHMAC}")
(attrValues cfg.rpc.users) (attrValues cfg.rpc.users)
} }
${lib.concatMapStrings (rpcbind: "rpcbind=${rpcbind}\n") cfg.rpcbind} rpcbind=${cfg.rpcbind}
rpcconnect=${builtins.elemAt cfg.rpcbind 0} rpcconnect=${cfg.rpcbind}
${lib.concatMapStrings (rpcallowip: "rpcallowip=${rpcallowip}\n") cfg.rpcallowip} ${lib.concatMapStrings (rpcallowip: "rpcallowip=${rpcallowip}\n") cfg.rpcallowip}
${optionalString (cfg.rpcuser != null) "rpcuser=${cfg.rpcuser}"} ${optionalString (cfg.rpcuser != null) "rpcuser=${cfg.rpcuser}"}
${optionalString (cfg.rpcpassword != null) "rpcpassword=${cfg.rpcpassword}"} ${optionalString (cfg.rpcpassword != null) "rpcpassword=${cfg.rpcpassword}"}
@ -126,8 +126,8 @@ in {
}; };
rpcbind = mkOption { rpcbind = mkOption {
type = types.listOf types.str; type = types.str;
default = [ "127.0.0.1" ]; default = "127.0.0.1";
description = '' description = ''
Bind to given address to listen for JSON-RPC connections. Bind to given address to listen for JSON-RPC connections.
''; '';

View File

@ -270,7 +270,7 @@ in {
services.liquidd = { services.liquidd = {
bind = netns.liquidd.address; bind = netns.liquidd.address;
rpcbind = [ netns.liquidd.address ]; rpcbind = netns.liquidd.address;
rpcallowip = [ rpcallowip = [
bridgeIp # For operator user bridgeIp # For operator user
netns.liquidd.address netns.liquidd.address