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:
@@ -15,10 +15,13 @@ in
|
||||
{
|
||||
test_only_required =
|
||||
let
|
||||
config = evalClan { directory = ./.; };
|
||||
config = evalClan {
|
||||
meta.name = "test";
|
||||
imports = [ ./module.nix ];
|
||||
};
|
||||
in
|
||||
{
|
||||
expr = config.pkgsForSystem null == null;
|
||||
expr = config.inventory ? meta;
|
||||
expected = true;
|
||||
};
|
||||
|
||||
@@ -93,10 +96,9 @@ in
|
||||
in
|
||||
{
|
||||
expr = result.clanInternals.meta;
|
||||
expected = {
|
||||
description = "description";
|
||||
icon = "icon";
|
||||
name = "superclan";
|
||||
expectedError = {
|
||||
type = "ThrownError";
|
||||
msg = "";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user