How to use nix-mode package in emacs?

Hello,

I’m trying to use the nix-mode emacs package, but I can’t really figure out how it’s supposed to be used. The nix-mode major mode itself works, I get correct syntax highlighting.

However I also want to use the package to build my flake.nix. I have an emacs project (project.el) set up pointing to my dotfiles (e.g. this folder).

But when switching to the project and executing M-x nix-flake, I get an error:

transient-setup: Invalid format character: ‘%v’

I’ve read through the manual but it’s not quite clear to me what I’m doing wrong. I’d appreciate any help.

Config: https://github.com/minikN/nix/blob/353f254a93b61c1c8e0678a0347ac86aae311d16/modules/development/emacs/code/lang/nix.nix

M-x version:

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0)
1 Like

just write an overlay to build emacs with epkgs
https://git.sr.ht/~carnotweat/netnix/tree/main/item/configuration.nix#L92
or through options of proms.emacs iirc