Skip to content

Instantly share code, notes, and snippets.

@axelbdt
Last active January 6, 2026 19:44
Show Gist options
  • Select an option

  • Save axelbdt/3abc5a94c43ef5676d5836d9b91202f6 to your computer and use it in GitHub Desktop.

Select an option

Save axelbdt/3abc5a94c43ef5676d5836d9b91202f6 to your computer and use it in GitHub Desktop.
Installing nixCats-nvim on NixOS flake + Home Manager

The NixOS flake and Home Manager were setup following this tutorial

# From root dir of the configuration
$ ls
catsnvim  configuration.nix flake.lock  flake.nix  hardware-configuration.nix  home.nix

To add nixCats to Home Manager...

Add the flake in a subdirectory :

mkdir catsnvim
cd catsnvim
nix flake init -t github:BirdeeHub/nixCats-nvim#example

Add the new flake as input catsnvim to our configuration using a path:

inputs = {
  # ... other inputs
  catsnvim = {
    url = "path:.catsnvim";
    inputs.nixpkgs.follows = "nixpkgs";
  };
};

Add catsvim to outputs arguments. The flake exports various modules. For Home Manager setup, pass catsnvim.homeModule to home-manager:

  outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, catsnvim, ... }: {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      specialArgs.pkgs-unstable = import nixpkgs-unstable {
        system = "x86_64-linux";
      };
      modules = [
      	./hardware-configuration.nix
        ./configuration.nix

        home-manager.nixosModules.home-manager
        {
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.users.axelb = {
            imports = [ catsnvim.homeModule ./home.nix ];
          };
        }
      ];
    };
  };

Enable nixCats the home.nix file :

{} :
{
  home.username = "axelb";
  # ... your config

  nixCats = {
    enable = true;
    packageNames = [ "nixCats" "regularCats" ];
  };
}

Rebuild your config:

sudo nixos-rebuild switch

Program nixCats should be available, it uses tne lua config as you have last built it with nixos-rebuild.

$ nixCats
# opens neovim with example config

Program regularCats is impure and will use external lua config as defined in catsnvim flake. By default, it looks for nixCats-nvim directorty inside ~/.config, ~/.local, etc. You can create a symlink between catsnvim directory, so that it loads the latest state of your lua config, e.g. for testing purpose.

ln -s <CATSNVIM DIRECTORY> ~/.config/nixCats-nvim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment