improve formatting
This commit is contained in:
parent
d60a5aa4db
commit
5e81d60d63
@ -5,6 +5,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.bitcoind;
|
cfg = config.services.bitcoind;
|
||||||
inherit (config) nix-bitcoin-services;
|
inherit (config) nix-bitcoin-services;
|
||||||
|
|
||||||
configFile = pkgs.writeText "bitcoin.conf" ''
|
configFile = pkgs.writeText "bitcoin.conf" ''
|
||||||
${optionalString cfg.testnet "testnet=1"}
|
${optionalString cfg.testnet "testnet=1"}
|
||||||
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
|
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
|
||||||
@ -43,10 +44,8 @@ let
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.bitcoind = {
|
services.bitcoind = {
|
||||||
enable = mkEnableOption "Bitcoin daemon";
|
enable = mkEnableOption "Bitcoin daemon";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.nix-bitcoin.bitcoind;
|
default = pkgs.nix-bitcoin.bitcoind;
|
||||||
@ -60,7 +59,6 @@ in {
|
|||||||
par=16
|
par=16
|
||||||
rpcthreads=16
|
rpcthreads=16
|
||||||
logips=1
|
logips=1
|
||||||
|
|
||||||
'';
|
'';
|
||||||
description = "Additional configurations to be appended to <filename>bitcoin.conf</filename>.";
|
description = "Additional configurations to be appended to <filename>bitcoin.conf</filename>.";
|
||||||
};
|
};
|
||||||
@ -74,7 +72,6 @@ in {
|
|||||||
default = configFile;
|
default = configFile;
|
||||||
description = "The data directory for bitcoind.";
|
description = "The data directory for bitcoind.";
|
||||||
};
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "bitcoin";
|
default = "bitcoin";
|
||||||
@ -85,7 +82,6 @@ in {
|
|||||||
default = cfg.user;
|
default = cfg.user;
|
||||||
description = "The group as which to run bitcoind.";
|
description = "The group as which to run bitcoind.";
|
||||||
};
|
};
|
||||||
|
|
||||||
rpc = {
|
rpc = {
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.ints.u16;
|
type = types.ints.u16;
|
||||||
@ -125,7 +121,6 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
rpcuser = mkOption {
|
rpcuser = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = "bitcoinrpc";
|
default = "bitcoinrpc";
|
||||||
@ -136,7 +131,6 @@ in {
|
|||||||
default = null;
|
default = null;
|
||||||
description = "Password for JSON-RPC connections";
|
description = "Password for JSON-RPC connections";
|
||||||
};
|
};
|
||||||
|
|
||||||
testnet = mkOption {
|
testnet = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -163,14 +157,15 @@ in {
|
|||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)
|
Create new files with system default permissions, instead of umask 077
|
||||||
|
(only effective with disabled wallet functionality)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
disablewallet = mkOption {
|
disablewallet = mkOption {
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Do not load the wallet and disable wallet RPC calls
|
Do not load the wallet and disable wallet RPC calls
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
dbCache = mkOption {
|
dbCache = mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user