@acidbong:envs.net | moin. i'm trying to expose my NixOS' config.i18n.glibcLocales (for the sake of being built and cached by CI) in a flake-parts way, but there's a catch
here's what I define:
{lib,self,...}: {
perSystem = {system, ...}: {
packages = {
glibcLocales-bong = lib.mkIf (
self.nixosConfigurations.bong.config.nixpkgs.hostPlatform.system == system
) self.nixosConfigurations.bong.config.i18n.glibcLocales;
};
};
}
I expect it to generate this
{
packages = {
aarch64-linux = {
...
dwm = ...;
hacksaw = ...;
...
};
x86_64-linux = {
...
dwm = ...;
glibcLocales-bong = ...;
hacksaw = ...;
...
};
};
}
but it does not: instead, when running nix flake show --all-systems, it still tries to evaluate it on a wrong system
$ nix flake show --all-systems
...
└───packages
├───aarch64-linux
│ ├───desktop-scripts: package 'desktop-scripts'
│ ├───dwm: package 'dwm-6.5'
error: The option `perSystem.aarch64-linux.packages.glibcLocales-bong' was accessed but has no value defined. Try setting the option.
before submitting to flake.parts, I wanna make sure whether they misimplement this or i misunderstood Nixpkgs modules and lib.types.attrsOf in particular | 07:16:41 |