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> {}
|
{ pkgs ? import <nixpkgs> {}
|
||||||
|
, lib ? pkgs.lib
|
||||||
, mode ? "mount"
|
, mode ? "mount"
|
||||||
, flake ? null
|
, flake ? null
|
||||||
, flakeAttr ? null
|
, flakeAttr ? null
|
||||||
|
@ -9,13 +10,13 @@
|
||||||
let
|
let
|
||||||
disko = import ./. {
|
disko = import ./. {
|
||||||
inherit rootMountPoint;
|
inherit rootMountPoint;
|
||||||
lib = pkgs.lib;
|
inherit lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
diskFormat = if flake != null then
|
diskFormat = if flake != null then
|
||||||
(pkgs.lib.attrByPath [ "diskoConfigurations" flakeAttr ] (builtins.abort "${flakeAttr} does not exist") (builtins.getFlake flake)) args
|
(pkgs.lib.attrByPath [ "diskoConfigurations" flakeAttr ] (builtins.abort "${flakeAttr} does not exist") (builtins.getFlake flake)) args
|
||||||
else
|
else
|
||||||
import diskoFile args;
|
import diskoFile ({ inherit lib; } // args);
|
||||||
|
|
||||||
diskoEval = if noDeps then
|
diskoEval = if noDeps then
|
||||||
if (mode == "create") then
|
if (mode == "create") then
|
||||||
|
|
Loading…
Reference in a new issue