Mix stable and unstable pkgs in darwin configuration flake

Hello !

My goal is to modify my existing flake to be able to install packages from both stable and unstable.
Here’s my setup so far.

First in my flake, I declared the inputs:

  inputs = {
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    nixpkgs-24_05.url = "github:NixOS/nixpkgs/nixos-24.05";

    home-manager-stable = {
      url = "github:nix-community/home-manager/release-24.05";
      inputs.nixpkgs.follows = "nixpkgs-24_05";
    };

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

    flake-utils.url = "github:numtide/flake-utils";

    darwin = {
      url = "github:lnl7/nix-darwin/master";
      inputs.nixpkgs.follows = "nixpkgs-unstable";
    };
  };

  outputs = inputs@{ self, flake-utils, darwin, nixpkgs-unstable, nixpkgs-24_05, home-manager-stable, home-manager-unstable }: {

    darwinConfigurations = {
      mbp2023 = darwin.lib.darwinSystem {
        system = "aarch64-darwin";
        modules = [
          ./machines/darwin/mbp2023/configuration.nix
          home-manager-unstable.darwinModules.home-manager
          {
            home-manager.useGlobalPkgs = true;
            home-manager.useUserPackages = true;
            home-manager.users.naderh =
              import ./nixpkgs/home-manager/mbp2023.nix;
            home-manager.extraSpecialArgs = {
            };
          }
          {
            nix.settings.trusted-users = [ "naderh" ];
          }
        ];
        inputs = { inherit darwin nixpkgs-24_05; };
      };
    };

  };

}

then in my mbp2023.nix file I have:

{ pkgs, pkgsUnstable, ... }:

{
  imports = [
    ./modules/home-manager.nix
  ];

  home.stateVersion = "23.05";

  home.packages = with pkgsUnstable; [
    # nerdfonts
    bitwarden-cli
  ];


  home.sessionVariables = {
    LANG = "en_US.UTF-8";
    LC_ALL = "en_US.UTF-8";
    LC_TIME = "fr_FR.UTF-8";
  };

}

I’m facing issues with this setup and am not sure how to properly integrate both stable and unstable package sources. Specifically, I’m having trouble getting pkgsUnstable to work correctly within my configuration. Any advice or insights on how to properly achieve this would be greatly appreciated!

Thank you!

Could you please describe what trouble it is you have experienced?

my problem was caused by another modification.

Thank you for your answer, I close the post.

PS: the code provided is correct, and this is a way of mixing stable and unstable packages.