tests: move mkIfTest
to nix-bitcoin.lib
This commit is contained in:
parent
bd5d70813f
commit
32db35d1bf
@ -12,7 +12,7 @@ with lib;
|
|||||||
|
|
||||||
lib = mkOption {
|
lib = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default = import ../pkgs/lib.nix lib pkgs;
|
default = import ../pkgs/lib.nix lib pkgs config;
|
||||||
defaultText = "nix-bitcoin/pkgs/lib.nix";
|
defaultText = "nix-bitcoin/pkgs/lib.nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
lib: pkgs:
|
lib: pkgs: config:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@ -115,4 +115,8 @@ let self = {
|
|||||||
(map (ip: "IP:${ip}") cert.extraIPs)
|
(map (ip: "IP:${ip}") cert.extraIPs)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
test = {
|
||||||
|
mkIfTest = test: mkIf (config.tests.${test} or false);
|
||||||
|
};
|
||||||
|
|
||||||
}; in self
|
}; in self
|
||||||
|
@ -13,7 +13,7 @@ let
|
|||||||
|
|
||||||
baseConfig = { pkgs, config, ... }: let
|
baseConfig = { pkgs, config, ... }: let
|
||||||
cfg = config.services;
|
cfg = config.services;
|
||||||
mkIfTest = test: mkIf (config.tests.${test} or false);
|
inherit (config.nix-bitcoin.lib.test) mkIfTest;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./lib/test-lib.nix
|
./lib/test-lib.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user