mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 21:13:28 +01:00
flake: deprecate .lib.lib
This commit is contained in:
1 parent
c2bdc227e4
commit
2bf4fc166b
3 files changed
+6
-6
No files matched your search
+3
-3
@@ -7,7 +7,7 @@ with lib;
|
||||
with builtins;
|
||||
|
||||
let
|
||||
|
||||
outputs = import ../default.nix { inherit lib diskoLib; };
|
||||
diskoLib = {
|
||||
|
||||
# like make-disk-image.nix from nixpkgs, but with disko config
|
||||
@@ -19,7 +19,7 @@ let
|
||||
testLib = import ./tests.nix { inherit lib makeTest eval-config; };
|
||||
# like lib.types.oneOf but instead of a list takes an attrset
|
||||
# uses the field "type" to find the correct type in the attrset
|
||||
subType = { types, extraArgs ? { parent = { type = "rootNode"; name = "root"; }; } }: lib.mkOptionType rec {
|
||||
subType = { types, extraArgs ? { parent = { type = "rootNode"; name = "root"; }; } }: lib.mkOptionType {
|
||||
name = "subType";
|
||||
description = "one of ${concatStringsSep "," (attrNames types)}";
|
||||
check = x: if x ? type then types.${x.type}.check x else throw "No type option set in:\n${generators.toPretty {} x}";
|
||||
@@ -584,6 +584,6 @@ let
|
||||
(lib.attrNames (builtins.readDir ./types))
|
||||
);
|
||||
|
||||
};
|
||||
} // outputs;
|
||||
in
|
||||
diskoLib
|
||||
Reference in new issue
Block a user