nix/create.nix
2025-06-18 01:06:36 +10:00

53 lines
1.1 KiB
Nix

{
system,
inputs,
sharedModules,
...
}:
with inputs;
let
nix-rice = import "${inputs.nix-rice}/lib.nix" {
inherit (nixpkgs) lib;
kitty-themes-src = { };
};
rice = import ./rice {
inherit
inputs
system
nix-rice
;
};
in
{
systems =
definitions:
nixpkgs.lib.mapAttrs (
name: info:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs rice;
mainUser = info.user;
};
modules =
[
./system/${name}.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs rice nix-rice;
mainUser = info.user;
};
users.${info.user}.imports = [
./home/${info.user}.nix
] ++ info.hmImports or [ ];
};
}
]
++ info.imports or [ ]
++ sharedModules;
}
) definitions;
}