{
  description = "System Flake";

  inputs = {
    nixpkgs.url = "github:NixOs/nixpkgs/nixos-25.05";
    home-manager = {
      url = "github:nix-community/home-manager/release-25.05";
      inputs.nixpkgs.follows = "nixpkgs";
    };
		nix-index-database.url = "github:nix-community/nix-index-database";
		nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
    neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
		disko.url = "github:nix-community/disko";
		sops-nix.url = "github:Mic92/sops-nix";
		sops-nix.inputs.nixpkgs.follows = "nixpkgs";
  };
  outputs = { self, nixpkgs, home-manager, nix-index-database, sops-nix, disko,  ... }@inputs:
    let
      overlays = [
       inputs.neovim-nightly-overlay.overlays.default
				(final: prev: {
          dosbox-x = prev.dosbox-x.overrideAttrs (old: {
            buildInputs = (old.buildInputs or []) ++ [ prev.libGL prev.glew ];
            configureFlags = (old.configureFlags or []) ++ [
              "--enable-sdl2"
              "--enable-opengl"
            ];
          });
        })
      ];
    in {
    nixosConfigurations.xps13 = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit overlays; };
      modules = [
        { nixpkgs.overlays = overlays; }
				sops-nix.nixosModules.sops
        ./xps13-hardware-configuration.nix.nix
        home-manager.nixosModules.home-manager {
          # home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.sharedModules = [ {nixpkgs.overlays = overlays;} ];
					home-manager.users.th3r00t = {
						imports = [
							./home-xps13.nix
							nix-index-database.homeModules.nix-index
						];
					};
          # home-manager.users.th3r00t = import ./home.nix;
          # Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
        }
      ];
    };
    nixosConfigurations.Titan = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit overlays; };
      modules = [
        { nixpkgs.overlays = overlays; }
				disko.nixosModules.disko
				sops-nix.nixosModules.sops
				./hardware-configuration.nix
        ./configuration-server.nix
        home-manager.nixosModules.home-manager {
          # home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.sharedModules = [ {nixpkgs.overlays = overlays;} ];
					home-manager.users.th3r00t = {
						imports = [
							./home-server.nix
							nix-index-database.homeModules.nix-index
						];
					};
          # home-manager.users.th3r00t = import ./home.nix;
          # Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
        }
      ];
    };
  };
}
