{ nixpkgs, darwin, hjem, wsl, ... }@inputs: name: { user, system, profile ? "nixos" }: assert builtins.elem profile [ "nixos" "darwin" "wsl" ]; let hjemModule = if profile == "darwin" then hjem.darwinModules else hjem.nixosModules; systemFunc = if profile == "darwin" then darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem; in systemFunc rec { specialArgs = { inherit inputs; inherit profile; inherit system; inherit user; }; modules = [ hjemModule.default ./modules/hjem.nix ./modules/nixpkgs.nix ../hosts/${name}/default.nix ../users/${user}/${if profile == "darwin" then "darwin" else "nixos"}.nix (nixpkgs.lib.optionalAttrs (profile == "wsl") wsl.nixosModules.default) ]; }