nix-community / nixos-vscode-server

Visual Studio Code Server support in NixOS
MIT License
419 stars 76 forks source link

auto-fix-vscode-server.description not correct type #64

Closed zeratax closed 1 year ago

zeratax commented 1 year ago

This suddenly seems to fail with:

error: A definition for option `systemd.user.services.auto-fix-vscode-server.description' is not of type `attribute set of (boolean or signed integer or string or list of (boolean or signed integer or string))'. Definition values:
       - In `/nix/store/qymv75jbxcvvwynbklna2m6kxzxkx2bh-source': "Automatically fix the VS Code server used by the remote SSH extension"
(use '--show-trace' to show detailed location information)
msteen commented 1 year ago

I tried in on both a server with an older version of NixOS and a VM (with release 23.05) and I could not reproduce your problem. Could you give me more details? What Nixpkgs are you using? How are you using it?

zeratax commented 1 year ago

I have this in my home-manager conf:

{
  imports = [
    (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master")
  ];

  services.vscode-server.enable = true;
  services.vscode-server.nodejsPackage = pkgs.nodejs-16_x;
}

and my system: $ nix-shell -p nix-info --run "nix-info -m":

msteen commented 1 year ago

That explains the issue. You are using the NixOS module within Home Manager, and the systemd configuration for both of them differ, as an example the description attribute in your reported error is one of the differences. To solve your issue you need to import the Home Manager module instead as described in the README. The only surprising thing is that you mention it suddenly not working anymore. It should never have worked the way you had it setup. So I am curious what caused that though. Since this should solve your problem. I am closing it for now.

zeratax commented 1 year ago

thank you so much! idk how i overlooked that 🤦