use different version of nixpkgs in home-manager

Sometimes, you want to install an old version of a package that is no longer supported in the current version of nixpkgs.

To do so, in your my-package.nix, add the following:

{ fileExplorer, pkgs, userSettings, ... }: let
  # Import your old nixpkgs.
  pkgs-22 = import (builtins.fetchTarball {
    url = "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz";
    sha256 = "1xi53rlslcprybsvrmipm69ypd3g3hr7wkxvzc73ag8296yclyll";
  }) { inherit (pkgs) system; };
in {
  home.packages = with pkgs; [
    dconf-editor
    # Use like this:
    pkgs-22.gnomeExtensions.highlight-focus
  ];
}

References: How to install a previous version of a specific package with configuration.nix?.