mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-22 10:05:06 +03:00
fix: uniquely identiy the format-module
this has the positive side effect that the nixos-generate binary now also works on configurations that already import one of the nixos modules That means, we can use the same cli interface regardless if the config was pre-produced or is produced by the cli on the fly fix: #181
This commit is contained in:
parent
d53f2d9aff
commit
20c21b9880
@ -8,7 +8,14 @@
|
||||
, flakeAttr ? null
|
||||
}:
|
||||
let
|
||||
module = import ./format-module.nix;
|
||||
module = rec {
|
||||
# ensures that this module has the same key as
|
||||
# the fromat-module that ships with 'nixos-generatores.nixosModules.*'.
|
||||
# Thereby, it will be deduplicated by the module system.
|
||||
_file = ./format-module.nix;
|
||||
key = _file;
|
||||
imports = [ ./format-module.nix];
|
||||
};
|
||||
|
||||
# Will only get evaluated when used, so no worries
|
||||
flake = builtins.getFlake flakeUri;
|
||||
|
Loading…
Reference in New Issue
Block a user