Variable name issue

I am trying to add an extension to my home-manager Firefox configuration from the following file:

Coincidentally it happens to be the first one, 10ten-ja-reader. However, I get the following error:

error: undefined variable 'ten-ja-reader’

which is ignoring the “10” at the start of the variable. I assume this might be an invalid variable name starting with a number, but in that case what should I do to to make this build the system configuration properly? Am I going to have to manually call buildFirefoxXpiAddon in my config, assigned to a different name? Or is there a simpler solution? The other Firefox extensions specified in my list work without problems. Thanks

You’re going to have to clarify how you’re importing this file and accessing it, as that’s the crux of the issue here.

It might be as simple as using foo."bar" syntax instead of

Hi, this is the relevant section of the config:

{ pkgs, ... }:

  programs.firefox = {
    enable = true;
    extensions = with pkgs.nur.repos.rycee.firefox-addons; [

Just don’t depend on with. It doesn’t work with attribute names that aren’t valid variable names. Replace 10ten-ja-reader with pkgs.nur.repos.rycee.firefox-addons."10ten-ja-reader" in the list and it should work.

That worked, thanks.