Skip to content

nixd 2.9.1 is crashing constantly #838

Description

@30350n

Describe the bug

nixd 2.9.1 is crashing constantly.

Logs

[...] # working normally I guess
I[23:51:52.992] 108940: <-- reply(1)
I[23:51:52.992] 108940: --> notify $/progress
I[23:51:53.738] 108940: <-- reply(1)
I[23:51:53.738] 108940: --> notify $/progress
I[23:51:53.778] 108940: <-- reply(1)
I[23:51:53.778] 108940: --> notify $/progress
E[23:51:53.778] 108940: home-manager eval expr: -32001: opening file '�[35;1m/etc/nixos/.jj/repo/config-id�[0m': �[35;1mPermission denied�[0m
I[23:51:54.961] 108940: <-- reply(2)
I[23:51:54.961] 108940: --> notify $/progress
E[23:51:54.961] 108940: nixos eval expr: -32001: opening file '�[35;1m/etc/nixos/.jj/repo/config-id�[0m': �[35;1mPermission denied�[0m
I[23:51:55.009] 108940: <-- reply(2)
I[23:51:55.009] 108940: --> notify $/progress
E[23:51:55.009] 108940: home-manager eval expr: -32001: opening file '�[35;1m/etc/nixos/.jj/repo/config-id�[0m': �[35;1mPermission denied�[0m
I[23:51:56.113] 108940: <-- reply(3)
I[23:51:56.113] 108940: --> notify $/progress
E[23:51:56.113] 108940: nixos eval expr: -32001: opening file '�[35;1m/etc/nixos/.jj/repo/config-id�[0m': �[35;1mPermission denied�[0m

Configuration

"nix.serverPath": "/nix/store/5zwl72j3iqx0k355y7rlx2w271rdyva5-nixd-2.9.1/bin/nixd",
  "nix.serverSettings": {
    "nixd": {
      "formatting": {
        "command": [
          "/nix/store/v65jw0ivma52zrqns7hl0sm5lb42sjh2-alejandra/bin/alejandra",
          "-qq"
        ]
      },
      "options": {
        "home-manager": {
          "expr": "(builtins.getFlake \"/etc/nixos/\").nixosConfigurations.desktop.options.home-manager.users.type.getSubOptions []"
        },
        "nixos": {
          "expr": "(builtins.getFlake \"/etc/nixos/\").nixosConfigurations.desktop.options"
        }
      }
    }
  },

To Reproduce

  1. run nixd

Expected behavior

It doesn't crash constantly.

Screenshots

No response

Additional context

I'm using git and jj for version control, the logs mention not being able to access files in my jj repo, so that might be important. I don't get why it'd need to access them though, the expressions evaluate fine if i run them (as an unpriviledged user) from a nix repl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions