{ inputs, overlays }: { mkSystem = { hostname , system , desktop ? false }: inputs.nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs system hostname desktop; }; modules = [ ../modules/deskop ../modules/system ../hosts/${hostname} { networking.hostName = hostname; # Apply overlay and allow unfree packages nixpkgs = { inherit overlays; config.allowUnfree = true; }; # Add each input as a registry nix.registry = inputs.nixpkgs.lib.mapAttrs' (n: v: inputs.nixpkgs.lib.nameValuePair (n) ({ flake = v; })) inputs; } ] }; mkHome = { username , system , hostname , desktop ? false }: inputs.home-manager.lib.homeManagerConfiguration { inherit username system; extraSpecialArgs = { inherit system hostname graphical; }; homeDirectory = "/home/${username}"; configuration = ../users/${username}; extraModules = [ ../modules/home-manager # Base configuration { nixpkgs = { inherit overlays; config.allowUnfree = true; }; programs = { home-manager.enable = true; git.enable = true; }; systemd.user.startServices = "sd-switch"; } ]; }; }