{ description = "Nixos: Home-Manager and System configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; hypr-contrib.url = "github:hyprwm/contrib"; }; outputs = { nixpkgs, home-manager, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; lib = nixpkgs.lib; user = "spagnologasper"; hostName = "yoga"; mkSystem = pkgs: system: hostname: pkgs.lib.nixosSystem { system = system; modules = [ ./modules/system/configuration.nix (./. + "/hosts/${hostname}/hardware-configuration.nix") (./. + "/hosts/${hostname}/default.nix") home-manager.nixosModules.home-manager { home-manager = { useUserPackages = true; useGlobalPkgs = true; extraSpecialArgs = { inherit inputs user; }; users.${user} = (./. + "/hosts/${hostname}/user.nix"); }; } ]; specialArgs = {inherit inputs user hostName; }; }; in { nixosConfigurations = { yoga = mkSystem inputs.nixpkgs "x86_64-linux" "yoga"; }; }; }