Merge #251: Services: Auto-enable dependencies
67e49fe415
services: auto-enable dependencies (Erik Arvstedt) Pull request description: ACKs for top commit: nixbitcoin: ACK67e49fe415
Tree-SHA512: 6e0f2e2ca4acdb7c5edd41eb3b56a9e95fc6d2ea9cfd08c1142429f88455c9d771f2f2be6339336448a289632f9768c4ae8f6c307038c5aa69c48b303043dda0
This commit is contained in:
commit
6933b0ef47
@ -65,7 +65,7 @@
|
|||||||
### SPARK WALLET
|
### SPARK WALLET
|
||||||
# Enable this module to use spark-wallet, a minimalistic wallet GUI for
|
# Enable this module to use spark-wallet, a minimalistic wallet GUI for
|
||||||
# c-lightning, accessible over the web or through mobile and desktop apps.
|
# c-lightning, accessible over the web or through mobile and desktop apps.
|
||||||
# Only available if clightning is enabled.
|
# Automatically enables clightning.
|
||||||
# services.spark-wallet.enable = true;
|
# services.spark-wallet.enable = true;
|
||||||
|
|
||||||
### ELECTRS
|
### ELECTRS
|
||||||
@ -87,6 +87,7 @@
|
|||||||
# services.btcpayserver.lightningBackend = "clightning";
|
# services.btcpayserver.lightningBackend = "clightning";
|
||||||
# Enable this option to connect BTCPayServert to lnd.
|
# Enable this option to connect BTCPayServert to lnd.
|
||||||
# services.btcpayserver.lightningBackend = "lnd";
|
# services.btcpayserver.lightningBackend = "lnd";
|
||||||
|
# The lightning backend service automatically enabled.
|
||||||
# Afterwards you need to go into Store > General Settings > Lightning Nodes
|
# Afterwards you need to go into Store > General Settings > Lightning Nodes
|
||||||
# and click to use "the internal lightning node of this BTCPay Server".
|
# and click to use "the internal lightning node of this BTCPay Server".
|
||||||
|
|
||||||
@ -99,13 +100,14 @@
|
|||||||
|
|
||||||
### 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
|
||||||
# accepting lightning payments. Only available if clightning is enabled.
|
# accepting lightning payments.
|
||||||
|
# Automatically enables clightning.
|
||||||
# services.lightning-charge.enable = true;
|
# services.lightning-charge.enable = true;
|
||||||
|
|
||||||
### NANOPOS
|
### NANOPOS
|
||||||
# Enable this module to use nanopos, a simple Lightning point-of-sale
|
# Enable this module to use nanopos, a simple Lightning point-of-sale
|
||||||
# system, powered by Lightning Charge. Only available if clightning and
|
# system, powered by Lightning Charge.
|
||||||
# lightning-charge are enabled.
|
# Automatically enables lightning-charge.
|
||||||
# services.nanopos.enable = true;
|
# services.nanopos.enable = true;
|
||||||
|
|
||||||
### WEBINDEX
|
### WEBINDEX
|
||||||
@ -117,7 +119,8 @@
|
|||||||
### RECURRING-DONATIONS
|
### RECURRING-DONATIONS
|
||||||
# Enable this module to send recurring donations. This is EXPERIMENTAL; it's
|
# Enable this module to send recurring donations. This is EXPERIMENTAL; it's
|
||||||
# not guaranteed that payments are succeeding or that you will notice payment
|
# not guaranteed that payments are succeeding or that you will notice payment
|
||||||
# failure. Only available if clightning is enabled.
|
# failure.
|
||||||
|
# Automatically enables clightning.
|
||||||
# services.recurring-donations.enable = true;
|
# services.recurring-donations.enable = true;
|
||||||
# Specify the receivers of the donations. By default donations are every
|
# Specify the receivers of the donations. By default donations are every
|
||||||
# Monday at a randomized time. Check `journalctl -eu recurring-donations` or
|
# Monday at a randomized time. Check `journalctl -eu recurring-donations` or
|
||||||
@ -149,6 +152,7 @@
|
|||||||
# Enable this module to use lightninglab's non-custodial off/on chain bridge.
|
# Enable this module to use lightninglab's non-custodial off/on chain bridge.
|
||||||
# loopd (lightning-loop daemon) will be started automatically. Users can
|
# loopd (lightning-loop daemon) will be started automatically. Users can
|
||||||
# interact with off/on chain bridge using `loop in` and `loop out`.
|
# interact with off/on chain bridge using `loop in` and `loop out`.
|
||||||
|
# Automatically enables lnd.
|
||||||
# services.lightning-loop.enable = true;
|
# services.lightning-loop.enable = true;
|
||||||
|
|
||||||
### Backups
|
### Backups
|
||||||
|
@ -90,13 +90,9 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.btcpayserver.enable {
|
config = mkIf cfg.btcpayserver.enable {
|
||||||
assertions = let
|
services.bitcoind.enable = true;
|
||||||
backend = cfg.btcpayserver.lightningBackend;
|
services.clightning.enable = mkIf (cfg.btcpayserver.lightningBackend == "clightning") true;
|
||||||
in [
|
services.lnd.enable = mkIf (cfg.btcpayserver.lightningBackend == "lnd") true;
|
||||||
{ assertion = (backend != null) -> cfg.${backend}.enable;
|
|
||||||
message = "btcpayserver requires ${backend}.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d '${cfg.nbxplorer.dataDir}' 0770 ${cfg.nbxplorer.user} ${cfg.nbxplorer.group} - -"
|
"d '${cfg.nbxplorer.dataDir}' 0770 ${cfg.nbxplorer.user} ${cfg.nbxplorer.group} - -"
|
||||||
|
@ -100,6 +100,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
services.bitcoind.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nix-bitcoin.clightning (hiPrio cfg.cli) ];
|
environment.systemPackages = [ pkgs.nix-bitcoin.clightning (hiPrio cfg.cli) ];
|
||||||
users.users.${cfg.user} = {
|
users.users.${cfg.user} = {
|
||||||
description = "clightning User";
|
description = "clightning User";
|
||||||
|
@ -61,6 +61,8 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.bitcoind.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nix-bitcoin.electrs ];
|
environment.systemPackages = [ pkgs.nix-bitcoin.electrs ];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
@ -117,6 +117,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [{
|
config = mkIf cfg.enable (mkMerge [{
|
||||||
|
services.bitcoind.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(hiPrio cfg.cli)
|
(hiPrio cfg.cli)
|
||||||
];
|
];
|
||||||
|
@ -38,11 +38,7 @@ in {
|
|||||||
warnings = [''
|
warnings = [''
|
||||||
The lightning-charge module is deprecated and will be removed soon.
|
The lightning-charge module is deprecated and will be removed soon.
|
||||||
''];
|
''];
|
||||||
assertions = [
|
services.clightning.enable = true;
|
||||||
{ assertion = config.services.clightning.enable;
|
|
||||||
message = "lightning-charge requires clightning.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
users.users.lightning-charge = {
|
users.users.lightning-charge = {
|
||||||
description = "lightning-charge User";
|
description = "lightning-charge User";
|
||||||
|
@ -62,11 +62,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
services.lnd.enable = true;
|
||||||
{ assertion = config.services.lnd.enable;
|
|
||||||
message = "lightning-loop requires lnd.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
||||||
|
|
||||||
|
@ -221,6 +221,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
services.bitcoind.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.nix-bitcoin.elementsd
|
pkgs.nix-bitcoin.elementsd
|
||||||
(hiPrio cfg.cli)
|
(hiPrio cfg.cli)
|
||||||
|
@ -154,6 +154,8 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.bitcoind.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
@ -76,11 +76,8 @@ in {
|
|||||||
The nanopos module is deprecated and will be removed soon. You can use the
|
The nanopos module is deprecated and will be removed soon. You can use the
|
||||||
btcpayserver module instead.
|
btcpayserver module instead.
|
||||||
''];
|
''];
|
||||||
assertions = [
|
|
||||||
{ assertion = config.services.lightning-charge.enable;
|
services.lightning-charge.enable = true;
|
||||||
message = "nanopos requires lightning-charge.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nix-bitcoin.nanopos ];
|
environment.systemPackages = [ pkgs.nix-bitcoin.nanopos ];
|
||||||
|
|
||||||
|
@ -79,11 +79,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
services.clightning.enable = true;
|
||||||
{ assertion = config.services.clightning.enable;
|
|
||||||
message = "recurring-donations requires clightning.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
users.users.recurring-donations = {
|
users.users.recurring-donations = {
|
||||||
description = "recurring-donations User";
|
description = "recurring-donations User";
|
||||||
|
@ -52,11 +52,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
services.clightning.enable = true;
|
||||||
{ assertion = config.services.clightning.enable;
|
|
||||||
message = "spark-wallet requires clightning.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nix-bitcoin.spark-wallet ];
|
environment.systemPackages = [ pkgs.nix-bitcoin.spark-wallet ];
|
||||||
users.users.spark-wallet = {
|
users.users.spark-wallet = {
|
||||||
|
Loading…
Reference in New Issue
Block a user