Title.
While a system module does indeed exist, I assume it's being wrapped in flake.nix to avoid the infinite recursion of pulling from kubix.result.
A workaround, that, albeit a bit ugly, works well for my projects:
# kubix.nix
{
config,
pkgs,
lib,
kubix,
...
}: let
builtManifests = kubix.lib.buildManifests pkgs.system {inherit (config) manifests;};
in {
imports = [
# <path/to/some-manifest-declaration.nix>
];
options.manifests = lib.mkOption {
type = lib.types.attrs;
default = {};
};
# ..do whatever with ${builtManifests}
}
# some-manifest-declaration.nix
{
manifests.myManifest = {
# declare your k8s manifest here
};
}
The usefulness of being able to rebuild (and subsequently reapply) manifests at nixos-rebuild switch-time is... dubious at best, since k8s itself is so incredibly runtime-dependent, but it may be worth it in certain situations.
Really hope to see this implemented!
Title.
While a system module does indeed exist, I assume it's being wrapped in
flake.nixto avoid the infinite recursion of pulling fromkubix.result.A workaround, that, albeit a bit ugly, works well for my projects:
The usefulness of being able to rebuild (and subsequently reapply) manifests at
nixos-rebuild switch-time is... dubious at best, since k8s itself is so incredibly runtime-dependent, but it may be worth it in certain situations.Really hope to see this implemented!