add module assertions
This commit is contained in:
parent
23cd323ad1
commit
f280d54bb8
@ -61,6 +61,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [{
|
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 ];
|
environment.systemPackages = [ pkgs.nix-bitcoin.electrs ];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
@ -33,6 +33,15 @@ in {
|
|||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
(mkIf (cfg.ledger || cfg.trezor) {
|
(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; [
|
environment.systemPackages = with pkgs; [
|
||||||
nix-bitcoin.hwi
|
nix-bitcoin.hwi
|
||||||
# Provides lsusb for debugging
|
# Provides lsusb for debugging
|
||||||
|
@ -24,6 +24,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{ 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";
|
||||||
group = "lightning-charge";
|
group = "lightning-charge";
|
||||||
|
@ -83,6 +83,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
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) ];
|
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
|
@ -52,6 +52,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{ assertion = config.services.lightning-charge.enable;
|
||||||
|
message = "nanopos requires lightning-charge.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nix-bitcoin.nanopos ];
|
environment.systemPackages = [ pkgs.nix-bitcoin.nanopos ];
|
||||||
systemd.services.nanopos = {
|
systemd.services.nanopos = {
|
||||||
description = "Run nanopos";
|
description = "Run nanopos";
|
||||||
|
@ -47,6 +47,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{ assertion = config.services.nanopos.enable;
|
||||||
|
message = "nix-bitcoin-webindex requires nanopos.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/www 0755 nginx nginx - -"
|
"d /var/www 0755 nginx nginx - -"
|
||||||
];
|
];
|
||||||
|
@ -78,6 +78,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{ 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";
|
||||||
group = "recurring-donations";
|
group = "recurring-donations";
|
||||||
|
@ -46,6 +46,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{ 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 = {
|
||||||
description = "spark-wallet User";
|
description = "spark-wallet User";
|
||||||
|
Loading…
Reference in New Issue
Block a user