Home-Manager not setting sessionVariables or shellAliases

I am using home-manager within my nix-darwin configuration file.
Like shown here.

I have set up programs, home.packages, home.stateVersion,
Everything works EXCEPT home.sessionVariables and home.shellAliases.

home.sessionVariables = { EDITOR = "nvim"; };
home.shellAliases = { asl = "aws sso login"; };

When I rebuild for some reason these two things are not set.
Any ideas?

Further context:
This is my darwin-configuration.nix file:

{ config, pkgs, ... }:

{
  nixpkgs.config.allowUnfree = true;
  nix.extraOptions = "experimental-features = nix-command flakes";

  environment.systemPackages = with pkgs; [
    wget
    vim
    .
    .
    .
  ];
  services.nix-daemon.enable = true;
 
  programs.zsh.enable = true; # default shell on catalina
 
  system.stateVersion = 4;

  # System Configurations
  environment.loginShell = pkgs.zsh;
  fonts.fonts = [
    (pkgs.nerdfonts.override { fonts = [ "Meslo" "FiraCode" "FiraMono" ]; })
  ];

  system.defaults.NSGlobalDomain."com.apple.mouse.tapBehavior" = 1;
  system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = false;
  system.defaults.dock.autohide = true;
  system.defaults.dock.static-only = true;
  system.defaults.dock.wvous-bl-corner = 2; # Bottom-Left hot corner is "Mission Control"
  system.defaults.finder.AppleShowAllExtensions = true;

  # Home Manager configurations
  imports = [ <home-manager/nix-darwin> ];

  users.users.<user> = {
    name = "<user>";
    home = "/Users/<user>";
  };

  home-manager.users.<user> = { pkgs, ... }: {
    home.sessionVariables = { EDITOR = "nvim"; };
    home.shellAliases = { asl = "aws sso login"; };

    programs = {
      fzf = {
        enable = true;
        enableZshIntegration = true;
      };
      gh = {
        enable = true;
        settings = {
          git_protocol = "ssh";
          prompt = "enabled";
        };
      };
      neovim = {
        enable = true;
        defaultEditor = true;
        vimAlias = true;
      };
    };

    home.packages = with pkgs; [
      bat
      tree
      .
      .
      .
    ];

    home.stateVersion = "22.05";
  };
}

As you can see I am doing both nix-darwin and home-manager in the same file.

My shell doesn’t have access to home-manager switch, I have to do darwin-rebuild switch to rebuild both.

Please let me know what might be going wrong.

This sounds like this issue but you are using Darwin. I had the same issue with home.sessionVariables having no effect, but on Linux. Since this pull request the issue has resolved for me but perhaps it is not on Darwin.