Clarify liquid/elements relation

This commit is contained in:
Jonas Nick 2019-08-05 15:11:27 +00:00
parent 5edf0d7240
commit 923939fe57
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
2 changed files with 8 additions and 6 deletions

View File

@ -43,10 +43,11 @@
# services.electrs.enable = true; # services.electrs.enable = true;
### LIQUIDD ### LIQUIDD
# Enable this module to use liquidd, a daemon for an inter-exchange # Enable this module to use Liquid, a sidechain for an inter-exchange
# settlement network linking together cryptocurrency exchanges and # settlement network linking together cryptocurrency exchanges and
# institutions around the world. # institutions around the world. Liquid is accessed with the elements-cli
# services.liquidd.enable = true; # tool run as user operator.
services.liquidd.enable = true;
### LIGHTNING CHARGE ### LIGHTNING CHARGE
# Enable this module to use lightning-charge, a simple drop-in solution for # Enable this module to use lightning-charge, a simple drop-in solution for

View File

@ -7,6 +7,7 @@ let
cfg = config.services.liquidd; cfg = config.services.liquidd;
pidFile = "${cfg.dataDir}/liquidd.pid"; pidFile = "${cfg.dataDir}/liquidd.pid";
configFile = pkgs.writeText "elements.conf" '' configFile = pkgs.writeText "elements.conf" ''
chain=liquidv1
${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}"}
${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"} ${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"}
@ -60,7 +61,7 @@ in {
options = { options = {
services.liquidd = { services.liquidd = {
enable = mkEnableOption "Liquid daemon"; enable = mkEnableOption "Liquid sidechain";
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
@ -181,7 +182,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.elementsd ]; environment.systemPackages = [ pkgs.elementsd ];
systemd.services.liquidd = { systemd.services.liquidd = {
description = "Liquid daemon"; description = "Elements daemon providing access to the Liquid sidechain";
requires = [ "liquid-rpcpassword-key.service" ]; requires = [ "liquid-rpcpassword-key.service" ];
after = [ "network.target" "liquid-rpcpassword-key.service" ]; after = [ "network.target" "liquid-rpcpassword-key.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -216,7 +217,7 @@ in {
name = cfg.user; name = cfg.user;
group = cfg.group; group = cfg.group;
extraGroups = [ "keys" ]; extraGroups = [ "keys" ];
description = "Liquid daemon user"; description = "Liquid sidechain user";
home = cfg.dataDir; home = cfg.dataDir;
}; };
users.groups.${cfg.group} = { users.groups.${cfg.group} = {