{
  description = "My flakes configuration";

  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";
    stylix = {
      url = "github:nix-community/stylix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    zen-browser = {
      url = "github:0xc000022070/zen-browser-flake";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.home-manager.follows = "home-manager";
    };
    master.url = "github:NixOS/nixpkgs/master";
    home-manager.url = "github:nix-community/home-manager";
    noctalia = {
      url = "github:noctalia-dev/noctalia-shell";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixvim = {
      url = "github:nix-community/nixvim";
      #inputs.nixpkgs.follows = "nixpkgs";
    };
    nixos-apple-silicon = {
      url = "github:tpwrules/nixos-apple-silicon";
    };
    astal = {
      url = "github:aylur/astal";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
  };


  outputs = { self, stylix, astal, nixpkgs, home-manager, zen-browser, master, nixos-apple-silicon, nixvim, noctalia,... }@inputs:
	  let
	    system = "x86_64-linux";
      lib = nixpkgs.lib;
      pkgs = nixpkgs.legacyPackages.${system};
      pkgs-master = master.legacyPackages.${system};
      username = "joshuaelm";
      name = "Joshua";
    in {
      nixosConfigurations = {
        nixos = nixpkgs.lib.nixosSystem {
          system = "x86_64-linux";
	  specialArgs = {inherit nixvim; inherit pkgs-master;};
	  specialArgs.inputs = inputs;
      modules = [
      	./hosts/desktop/configuration.nix
	    	home-manager.nixosModules.home-manager 
	    {	
	      home-manager.useUserPackages = true;
	      home-manager.extraSpecialArgs = {inherit inputs;};
	      home-manager.users.joshuaelm = {
				imports = [ ./hosts/desktop/home.nix nixvim.homeModules.nixvim stylix.homeModules.stylix ];
	      };
	    }  
	  ];
        };
        nixos-laptop = nixpkgs.lib.nixosSystem {
          system = "aarch64-linux";
	  specialArgs = {inherit nixvim;};
	  specialArgs.inputs = inputs;
          modules = [
            {
            }
            nixos-apple-silicon.nixosModules.apple-silicon-support
	    #stylix.nixosModules.stylix
            ./hosts/mac-laptop/configuration.nix
	    home-manager.nixosModules.home-manager
	    {
	      home-manager.useUserPackages = true;
	      home-manager.extraSpecialArgs = {inherit inputs;};
	      home-manager.users.joshuaelm = {
		imports = [ ./hosts/mac-laptop/home.nix nixvim.homeModules.nixvim stylix.homeModules.stylix ];
	      };
	    }
	  ];
        };
      };
    };
	
}

