Nix develop not recognising experimental features

Hi,

I am try to run a flake for my python environment.
I am running on a Pop_OS! with nix and the configuration built from a flake with home-manager.

The flake works on my NixOS systems but here I get this error:

❯ nix develop
error: experimental Nix feature 'ca-derivations' is disabled; add '--extra-experimental-features ca-derivations' to enable it

The odd thing is that it is enabled… Indeed running this command doesnt help

❯ nix --extra-experimental-features ca-derivations develop 
error: experimental Nix feature 'ca-derivations' is disabled; add '--extra-experimental-features ca-derivations' to enable it

And as one can see

❯ nix config show | grep experimental-features
experimental-features = ca-derivations fetch-tree flakes nix-command pipe-operators

Has anyone an idea of how to solve this? Or even where could be lying the problem to start debugging it?

Thanks

p.s.
The flake I am trying to run is

{
  description = "ttbregman shell";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  };

  outputs = {
    self,
    nixpkgs,
    ...
  }: let
    pkgs = nixpkgs.legacyPackages."x86_64-linux";
    python = pkgs.python3;

    # Define the custom Python package separately
    ucimlrepo = python.pkgs.buildPythonPackage rec {
      pname = "ucimlrepo";
      version = "0.0.7";
      src = pkgs.fetchFromGitHub {
        owner = "uci-ml-repo";
        repo = "ucimlrepo";
        rev = "main";
        # sha256 = nixpkgs.lib.fakeHash;
        sha256 = "sha256-5R4/edQriufhVU1UXCY7nTfEdwRhi33e/CHdTkLf3jo=";
      };
      # Add dependencies if needed
      # propagatedBuildInputs = with python.pkgs; [ ... ];
    };
  in {
    devShells.x86_64-linux.default = pkgs.mkShell {
      packages = [
        (python.withPackages (p:
          with p; [
            matplotlib
            tqdm
            torch
            jedi-language-server
            black
            pandas
            ucimlrepo
            scikit-learn
          ]))
      ];
    };
  };
}

Okay I solved it,
basically it is not enough for experimental-features to be in
~/.config/nix/nix.conf
But it should also be manually put to
/etc/nix/nix.conf
and then
sudo systemctl restart nix-daemon

Just FYI, to confirm if you have the correct configuration loaded by Nix, do a nix config show and then grep for the option that you intended to change.

It depends on the feature… flakes and nix-command are fine to be in the user config, though ca-erivations require special treatment by the “store owner”, in your case the demon, so it has to be enabled on the config read and used by the demon.