{ description = "NixOS configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05/"; home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, home-manager, ... } @ inputs: let system = "x86_64-linux"; username = "xory"; mkNixosHost = hostName: nixpkgs.lib.nixosSystem { inherit system; modules = [ ./hosts/${hostName}/configuration.nix ./hosts/${hostName}/hardware-configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.${username} = import ./hosts/${hostName}/home.nix; } ]; }; in { nixosConfigurations = nixpkgs.lib.mapAttrs' (name: value: { name = name; value = mkNixosHost name; }) (nixpkgs.lib.filterAttrs (name: value: value == "directory") (builtins.readDir ./hosts)); }; }