merge-modules accepts >1 module
This commit is contained in:
@@ -5,11 +5,11 @@ let
|
||||
inherit (nixpkgs) lib pkgs;
|
||||
inherit (lib.asserts) assertMsg;
|
||||
config =
|
||||
(import <liminix/merge-modules.nix>) ./configuration.nix {} pkgs;
|
||||
(import <liminix/merge-modules.nix>) [./configuration.nix] pkgs;
|
||||
res1 = assertMsg
|
||||
# check we have packages from both modules
|
||||
(config.config.systemPackages == ( with pkgs; [ units hello ])) "failed";
|
||||
res2 = let s = config.config.services;
|
||||
(config.systemPackages == ( with pkgs; [ units hello ])) "failed";
|
||||
res2 = let s = config.services;
|
||||
in assertMsg (s.a.enable && s.b.enable && (s.z != null) ) "failed";
|
||||
in pkgs.writeText "foo" ''
|
||||
${if res1 then "OK" else "not OK"}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs } :
|
||||
{ config, pkgs, ... } :
|
||||
let
|
||||
inherit (pkgs.liminix.networking) interface address udhcpc odhcpc;
|
||||
inherit (pkgs.liminix.services) oneshot longrun bundle target output;
|
||||
|
Reference in New Issue
Block a user