Use services.mako.settings instead?

I cannot build my home-manager on unstable branch after recent update.

Failed assertions:
       - johndoe profile: The option definition `services.mako.extraConfig' in `/nix/store/3hkj2clnr6wxqmja1f6wy11sk2m2cm6q-source/modules/home-manager/mako.nix' no longer has any effect; please remove it.
       Use services.mako.settings instead.

I tried to grep mako in my configuration, but to no avail. Any tips to workaround this issue?

This might be helpful for chasing down where the option is set:

❯ hmo
Nix 2.24.14
Type :? for help.
Loading installable ''...
Added 8 variables.
nix-repl> :p options.services.mako.extraConfig.definitionsWithLocations
[
  {
    file = "/nix/store/fm6zdz7p5k2268bdcws1qp034z5s2hhx-source/modules/home-manager/mako.nix";
    value = "[urgency=high]\nborder-color=#fab387";
  }
]

nix-repl> 

where hmo is defined is

~ 
❯ cat -p (which hmo)
#!/nix/store/mc4485g4apaqzjx59dsmqscls1zc3p2w-bash-5.2p37/bin/bash
exec /nix/store/675jb1s55193skcbj4pqlmd6jdrg8lxl-nix-2.24.14/bin/nix repl \
  --file '<home-manager/modules>' \
  --arg configuration /home/ben/.config/home-manager/home.nix \
  --arg pkgs 'import <nixpkgs> {}'

I don’t use flakes, but there is probably a cool flake way to do the same thing. Inspiration drawn from this talk

Thank you for the suggestions! However, it does not work on my side. :bowing_man:

nix-repl> :p options.services.mako.extraConfig.definitionsWithLocations
error: undefined variable 'options'
       at «string»:1:1:
            1| options.services.mako.extraConfig.definitionsWithLocations
             | ^

You could use the nixos-option cli as well.

Are you using stylix? I think I have seen this a couple of times recently when the used stylix and HM are not properly in sync.

I’m not familiar with nixos-option. Thanks for the tip!

Grep stylix returns nothing in my configuration files. Thanks for the tips!

Based on an educated guess (https://github.com/search?q=path%3Amodules%2Fhome-manager%2Fmako.nix&type=code):

Perhaps you use catppuccin for nix? If so, they need to fix this.

EDIT: seems like there’s an open PR for it, even. fix(home-manager/mako): use settings instead of extraConfig by MisileLab · Pull Request #553 · catppuccin/nix · GitHub

I think you nailed it, i am using catpuccin and it just clicked that I don’t set extraConfig for mako myself, and sure enough, if I inspect the source suggested in my own post, it is the catpuccin repo that is setting it for me too.

(I’m just not hitting a problem because I’m not on unstable, but I’ll consider myself forewarned just in case).

how did you invoke the repl? you need to pass an expression that loads your configuration if you want to be able to inspect it, but I should have also mentioned that I am using home-manager in standalone mode, perhaps you have it setup differently (i.e. part of nixos / nix-darwin), that would require a totally different way of setting up the repl. See the talk for details.

Yeah, catppuccin projects drive me a little nuts with the amount of breaking changes needed to handle simply setting a theme, which is why I moved off it. But in the meantime, OP you can set catppuccin.mako.enable = false; to unblock your build, until upstream fixes.

Yes! I’m using catppuccin! It is defined in my flake.nix file.

catppuccin.url = "github:catppuccin/nix";

Thank you everyone for helping me to pinpoint the issue.

The catppuccin.mako.enable = false; alternative works for now while waiting for upstream fixes.