mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-09-11 12:15:29 +03:00
nixosGenerate: add lib parameter
This commit is contained in:
parent
02e332e8d0
commit
d8db0197da
@ -26,12 +26,13 @@
|
||||
# format = "vmware";
|
||||
# };
|
||||
# }
|
||||
nixosGenerate = { pkgs ? null, format, system ? null, specialArgs ? { }, modules ? [ ] }:
|
||||
nixosGenerate = { pkgs ? null, lib ? nixpkgs.lib, format, system ? null, specialArgs ? { }, modules ? [ ] }:
|
||||
let
|
||||
formatModule = builtins.getAttr format nixosModules;
|
||||
image = nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs specialArgs;
|
||||
system = if system != null then system else pkgs.system;
|
||||
lib = if lib != null then lib else pkgs.lib;
|
||||
modules = [
|
||||
formatModule
|
||||
] ++ modules;
|
||||
|
Loading…
Reference in New Issue
Block a user