new_dots/modules/nix/flake-parts/lib.nix
2026-03-28 00:04:05 +01:00

21 lines
400 B
Nix

{
inputs,
lib,
...
}: {
options.flake.lib = lib.mkOption {
type = lib.types.attrsOf lib.types.unspecified;
default = {};
};
config.flake.lib = {
mkNixos = system: name: {
${name} = inputs.nixpkgs.lib.nixosSystem {
modules = [
inputs.self.modules.nixos.${name}
{nixpkgs.hostPlatform = lib.mkDefault system;}
];
};
};
};
}