inputs: let mkHost = { system, hostname, username, systemModules, homeModule, }: { nixos = inputs.nixpkgs.lib.nixosSystem { modules = systemModules ++ [ { users.users.${username} = { isNormalUser = true; description = ""; extraGroups = [ "networkmanager" "wheel" ]; }; } ]; inherit system; specialArgs = { inherit inputs hostname username; }; }; home-manager = inputs.home-manager.lib.homeManagerConfiguration { pkgs = import inputs.nixpkgs { inherit system; config.allowUnfree = true; }; extraSpecialArgs = { inherit inputs hostname username; }; modules = [ { home = { inherit username; homeDirectory = "/home/${username}"; }; programs.home-manager.enable = true; } (import ../system/home-manager) ] ++ homeModule; }; }; in rec { hosts = { arcadia = mkHost { system = "x86_64-linux"; hostname = "Arcadia"; username = "hare"; systemModules = [ ./arcadia/nixos.nix ]; homeModule = [ ./arcadia/home-manager.nix ]; }; x1carbon = mkHost { system = "x86_64-linux"; hostname = "x1carbon"; username = "hare"; systemModules = [ ./x1carbon/nixos.nix ]; homeModule = [ ./x1carbon/home-manager.nix ]; }; fungus = mkHost { system = "x86_64-linux"; hostname = "Fungus"; username = "hare"; systemModules = [ ./fungus/nixos.nix ]; homeModule = [ ./fungus/home-manager.nix ]; }; }; nixos = builtins.mapAttrs (_: host: host.nixos) hosts; home-manager = builtins.mapAttrs (_: host: host.home-manager) hosts; }