mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
also inherit lib for disko scripts
This commit is contained in:
parent
0fadf13755
commit
9f58230409
1 changed files with 3 additions and 2 deletions
5
cli.nix
5
cli.nix
|
@ -1,4 +1,5 @@
|
|||
{ pkgs ? import <nixpkgs> {}
|
||||
, lib ? pkgs.lib
|
||||
, mode ? "mount"
|
||||
, flake ? null
|
||||
, flakeAttr ? null
|
||||
|
@ -9,13 +10,13 @@
|
|||
let
|
||||
disko = import ./. {
|
||||
inherit rootMountPoint;
|
||||
lib = pkgs.lib;
|
||||
inherit lib;
|
||||
};
|
||||
|
||||
diskFormat = if flake != null then
|
||||
(pkgs.lib.attrByPath [ "diskoConfigurations" flakeAttr ] (builtins.abort "${flakeAttr} does not exist") (builtins.getFlake flake)) args
|
||||
else
|
||||
import diskoFile args;
|
||||
import diskoFile ({ inherit lib; } // args);
|
||||
|
||||
diskoEval = if noDeps then
|
||||
if (mode == "create") then
|
||||
|
|
Loading…
Reference in a new issue