{
	description = "Nixos config flake";

	inputs = {
	nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
	nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.05";

	home-manager = {
		url = "github:nix-community/home-manager";
		inputs.nixpkgs.follows = "nixpkgs";
	};

	niri = {
		url = "github:sodiboo/niri-flake";
		inputs.nixpkgs.follows = "nixpkgs";
	};

	nixd = {
		url = "github:nix-community/nixd";
		inputs.nixpkgs.follows = "nixpkgs";
	};

  };

  outputs = { self, nixpkgs, ... }@inputs: {
    # Home Manager configurations when we want to run it independently
    homeConfigurations = { 
      desktop = inputs.home-manager.lib.homeManagerConfiguration {
	extraSpecialArgs = {inherit inputs;};
	pkgs = import nixpkgs {
		system = "x86_64-linux";
	};
        modules = [
          ./configurations/desktop/home.nix
        ];
      };
      laptop = inputs.home-manager.lib.homeManagerConfiguration {
	extraSpecialArgs = {inherit inputs;};
	pkgs = import nixpkgs {
		system = "x86_64-linux";
	};
        modules = [
          ./configurations/laptop/home.nix
        ];
      };
    };

    # Dedicated NixOS configurations
    nixosConfigurations = { 
      desktop = nixpkgs.lib.nixosSystem {
        specialArgs = {inherit inputs;};
        modules = [
		      #inputs.musnix.nixosModules.musnix
		      #inputs.chaotic.nixosModules.default
		      ./global.nix
          ./configurations/desktop/configuration.nix
        ];
      };
      laptop-thinkpad = nixpkgs.lib.nixosSystem {
        specialArgs = {inherit inputs;};
        modules = [
	        ./global.nix
          ./configurations/laptop-thinkpad/configuration.nix
        ];
      };
      laptop-elitebook = nixpkgs.lib.nixosSystem {
        specialArgs = {inherit inputs;};
        modules = [
	        ./global.nix
          ./configurations/laptop-elitebook/configuration.nix
        ];
      };
    };
  };
}
