Fix: forward meta attributes in flake-parts module
This fixes building machines with the flake-parts module. Since the inventory merges the machines, the `clan.core.meta` attribute is now a submodule and conditionally imported. Also drops the following attributes: - clan.core.meta.icon - clan.core.meta.description In favor of specifying them inside the inventory. This doesn't use `mkRemovedOptionsModule`, because in our case it would cause infinite recursion.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ lib, self, ... }:
|
||||
let
|
||||
types = lib.types;
|
||||
in
|
||||
@@ -7,6 +7,7 @@ in
|
||||
# Required options
|
||||
directory = lib.mkOption {
|
||||
type = types.path;
|
||||
default = self;
|
||||
description = "The directory containing the clan subdirectory";
|
||||
};
|
||||
|
||||
@@ -26,22 +27,18 @@ in
|
||||
};
|
||||
|
||||
# Meta
|
||||
meta = {
|
||||
name = lib.mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to.";
|
||||
};
|
||||
icon = lib.mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "A path to an icon to be used for the clan in the GUI";
|
||||
};
|
||||
description = lib.mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "A short description of the clan";
|
||||
};
|
||||
meta = lib.mkOption {
|
||||
type = types.nullOr (
|
||||
types.submodule {
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to.";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
|
||||
pkgsForSystem = lib.mkOption {
|
||||
|
||||
Reference in New Issue
Block a user