{
  description = "Home Manager configuration";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    nixpkgs-pre-ad01.url = "github:nixos/nixpkgs/0182a361324364ae3f436a63005877674cf45efb";

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

    quickshell = {
      url = "github:outfoxxed/quickshell";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    noctalia = {
      url = "github:noctalia-dev/noctalia-shell";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };

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

    niri = {
      url = "github:Lukrecjaaa/niri";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    codex-cli-nix = {
      url = "github:sadjow/codex-cli-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    claude-code-nix = {
      url = "github:sadjow/claude-code-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    binaryninja = {
      url = "github:jchv/nix-binary-ninja";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, nixpkgs-pre-ad01, home-manager, rust-overlay, stylix, niri, codex-cli-nix, claude-code-nix, binaryninja, ... }@inputs:
    let
      system = "x86_64-linux";
      pinnedPkgs = nixpkgs-pre-ad01.legacyPackages.${system};
    in {
      homeConfigurations.lusia = home-manager.lib.homeManagerConfiguration {
        pkgs = nixpkgs.legacyPackages.${system};

        modules = [
          stylix.homeModules.stylix
          ./noctalia.nix
          ./home.nix
          ({ pkgs, ... }: {
            nixpkgs.overlays = [
              rust-overlay.overlays.default
              (final: prev: {
                gqrx = pinnedPkgs.gqrx;
                krita = pinnedPkgs.krita;
              })
            ];
            home.packages = [ pkgs.rustup ];
          })
        ];

        extraSpecialArgs = { inherit inputs; };
      };
    };
}
