mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-09-11 12:15:29 +03:00
fix: format module identity
This commit is contained in:
parent
50aeec40f2
commit
1f311a13e1
@ -1,4 +1,11 @@
|
|||||||
{ lib, ... }: {
|
{ lib, ... }: rec {
|
||||||
|
_file = ./format-module.nix;
|
||||||
|
# This deliberate key makes sure this module will be deduplicated
|
||||||
|
# regardless of the accessor path: either via flake's nixosModule
|
||||||
|
# or as part of the nixos-generate command. These two store paths
|
||||||
|
# of the module may differ and hence don't serve as a key
|
||||||
|
key = "github:nix-community/nixos-generators/format-module.nix";
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
filename = lib.mkOption {
|
filename = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -8,14 +8,7 @@
|
|||||||
, flakeAttr ? null
|
, flakeAttr ? null
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
module = rec {
|
module = import ./format-module.nix;
|
||||||
# ensures that this module has the same key as
|
|
||||||
# the format-module that ships with 'nixos-generators.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
|
# Will only get evaluated when used, so no worries
|
||||||
flake = builtins.getFlake flakeUri;
|
flake = builtins.getFlake flakeUri;
|
||||||
@ -29,7 +22,7 @@ in
|
|||||||
import "${toString nixpkgs}/nixos/lib/eval-config.nix" {
|
import "${toString nixpkgs}/nixos/lib/eval-config.nix" {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
(import ./format-module.nix)
|
module
|
||||||
formatConfig
|
formatConfig
|
||||||
configuration
|
configuration
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user