mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-22 18:24:59 +03:00
Merge pull request #191 from foo-dogsquared/nixosGenerate-add-lib-parameter
This commit is contained in:
commit
50aeec40f2
@ -26,12 +26,13 @@
|
|||||||
# format = "vmware";
|
# format = "vmware";
|
||||||
# };
|
# };
|
||||||
# }
|
# }
|
||||||
nixosGenerate = { pkgs ? null, format, system ? null, specialArgs ? { }, modules ? [ ] }:
|
nixosGenerate = { pkgs ? null, lib ? nixpkgs.lib, format, system ? null, specialArgs ? { }, modules ? [ ] }:
|
||||||
let
|
let
|
||||||
formatModule = builtins.getAttr format nixosModules;
|
formatModule = builtins.getAttr format nixosModules;
|
||||||
image = nixpkgs.lib.nixosSystem {
|
image = nixpkgs.lib.nixosSystem {
|
||||||
inherit pkgs specialArgs;
|
inherit pkgs specialArgs;
|
||||||
system = if system != null then system else pkgs.system;
|
system = if system != null then system else pkgs.system;
|
||||||
|
lib = if lib != null then lib else pkgs.lib;
|
||||||
modules = [
|
modules = [
|
||||||
formatModule
|
formatModule
|
||||||
] ++ modules;
|
] ++ modules;
|
||||||
|
Loading…
Reference in New Issue
Block a user