The option `programs.cavalier' does not exist

Hi, I’ve been getting this error for days now

       error: The option `programs.cavalier' does not exist. Definition values:
       - In `/nix/store/752k321mn6b3vxyn5givd0sqylwgsakv-source/modules/cavalier/hm.nix':
           {
             _type = "if";
             condition = true;
             content = {
               settings = {
           ...

I’m not specifically installing cava or cavalier anywhere in my configuration, so I’m guessing it’s a dependency of something else I installed. Also I searched the cavalier home-manager module on mynixos.com but nothing turned up.
Please help cause I can’t install any other packages with home-manager as long as this issue persists

Here are all my input in my flake.nix

  inputs = {
    nixpkgs.url = "nixpkgs/nixos-24.11";
    flake-utils.url = "github:numtide/flake-utils";
    home-manager.url = "github:nix-community/home-manager/release-24.11";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    stylix.url = "github:danth/stylix";
    nvf.url = "github:notashelf/nvf";
    nixvim = {
      url = "github:nix-community/nixvim/nixos-24.11";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

Share your flake.lock as well please.

Hi @waffle8946 it’s quite large and surpasses the character limit. Here’s the github link viceos/flake.lock at 3bdc022e5099de2fd4c6bb8e2d75c7ad0bfde165 · McEazy2700/viceos · GitHub

This programs.cavalier option hierarchy is getting defined in stylix, but isn’t declared in hm, hence the error.

Seems like the problem is a mismatch between your stylix version vs nixpkgs/hm.
If you want to use stable for everything, use github:danth/stylix/release-24.11 for the stylix input as well.

1 Like

Thanks @waffle8946 it works