Bat is no longer working

I am no longer able to have bat enabled in my home-manager. I have configured it as follows:

  programs.bat = {
    enable = true;

It had been running for a long time, and recently I started getting this error when running home-manager -switch:

Activating batCache
error: unexpected argument '--build' found

  tip: to pass '--build' as a value, use '-- --build'

Usage: bat <FILE>...

For more information, try '--help'.

Any thoughts?

I have the same issue but unfortunately no solution and this post is the only result on google.

edit: I’ve worked around it by now by removing “programs.bat.enable = true” and just adding bat to “home.packages”

I’ve seen issue with enabling and/or installing a program in multiple locations/ways. Make sure that if you’ve enabled bat via, say, Home Manager with programs.bat.enable, that you don’t also install it via NixOS or Home Manager with environment.systemPackages or home.packages respectively.

Neither our bat package nor home-manager’s bat module has changed in months. What versions of Nixpkgs and HM are you running?

Sorry for the late response.

nixpkgs - 24.05pre-git

home-manager - 24.05-pre