Skip to content

error: Xremap's config needs to be specified either in .yamlConfig or in .config when using both home manager and nixos modules #73

@UnclePsymon

Description

@UnclePsymon

Hi! After rebuilding my system I get this error:

error:
       … while calling the 'head' builtin

         at /nix/store/lzhqf5y9dcgfkg5f7f96jjc814pgrsqy-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/lzhqf5y9dcgfkg5f7f96jjc814pgrsqy-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Xremap's config needs to be specified either in .yamlConfig or in .config

This is from my configuration.nix:

 imports = [
    ./hardware-configuration.nix
    inputs.home-manager.nixosModules.default
    inputs.xremap-flake.nixosModules.default
];
  
  services.xremap = {
    enable = true;
    withX11 = true;
    serviceMode = "user";
    userName = "simon";
    config = {
      keymap = [
        {
          name = "Main";
          remap = {
            super-o = {
              launch = ["obsidian"];
            };
            name = "Kitty";
            remap = {
              super-c = {
                launch = ["kitty"];
              };
            };
          };
        }
      ];
    };
  };

I tried many variations of my configuration, but i always get this error message. So i tried this as well:

  services.xremap = {
    serviceMode = "user";
    userName = "simon";
    config = {
      modmap = [
        {
          name = "Global";
          remap = {"CapsLock" = "Esc";}; # globally remap CapsLock to Esc
        }
      ];
      keymap = [
        {
          name = "apps";
          remap.alt-p.launch = ["firefox"];
        }
        {
          name = "Example ctrl-u > pageup rebind";
          remap = {"C-p" = "PAGEUP";};
        }
      ];
    };
  };

Isn't this the required .config? Or did I miss something important? Thank you ❤️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions