add module assertions
This commit is contained in:
parent
23cd323ad1
commit
f280d54bb8
@ -61,6 +61,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [{
|
||||
assertions = [
|
||||
{ assertion = config.services.bitcoind.prune == 0;
|
||||
message = "electrs does not support bitcoind pruning.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.nix-bitcoin.electrs ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
|
@ -33,6 +33,15 @@ in {
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.ledger || cfg.trezor) {
|
||||
assertions = [
|
||||
{ assertion = (config.services.bitcoind.disablewallet == null || !config.services.bitcoind.disablewallet);
|
||||
message = ''
|
||||
Hardware-Wallets are not compatible with bitcoind.disablewallet.
|
||||
Note that this option is active when enabling electrs.high-memory.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix-bitcoin.hwi
|
||||
# Provides lsusb for debugging
|
||||
|
@ -24,6 +24,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = config.services.clightning.enable;
|
||||
message = "lightning-charge requires clightning.";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.lightning-charge = {
|
||||
description = "lightning-charge User";
|
||||
group = "lightning-charge";
|
||||
|
@ -83,6 +83,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = config.services.bitcoind.prune == 0;
|
||||
message = "lnd does not support bitcoind pruning.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
|
@ -52,6 +52,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = config.services.lightning-charge.enable;
|
||||
message = "nanopos requires lightning-charge.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.nix-bitcoin.nanopos ];
|
||||
systemd.services.nanopos = {
|
||||
description = "Run nanopos";
|
||||
|
@ -47,6 +47,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = config.services.nanopos.enable;
|
||||
message = "nix-bitcoin-webindex requires nanopos.";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/www 0755 nginx nginx - -"
|
||||
];
|
||||
|
@ -78,6 +78,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = config.services.clightning.enable;
|
||||
message = "recurring-donations requires clightning.";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.recurring-donations = {
|
||||
description = "recurring-donations User";
|
||||
group = "recurring-donations";
|
||||
|
@ -46,6 +46,12 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = config.services.clightning.enable;
|
||||
message = "spark-wallet requires clightning.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.nix-bitcoin.spark-wallet ];
|
||||
users.users.spark-wallet = {
|
||||
description = "spark-wallet User";
|
||||
|
Loading…
Reference in New Issue
Block a user