Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation directions not working on NixOS 23.05.2613.011567f35433 #66

Open
samuela opened this issue Aug 16, 2023 · 2 comments
Open

Comments

@samuela
Copy link

samuela commented Aug 16, 2023

I'm following the "NixOS module" installation directions in the README. In particular, I have

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

services.vscode-server.enable = true;

in my /etc/nixos/configuration.nix and have run sudo nixes-rebuild switch.

But then:

$ systemctl --user enable auto-fix-vscode-server.service
Failed to enable unit: Unit file auto-fix-vscode-server.service does not exist.

Why is this command failing? How can I enable the service?

@msteen
Copy link
Collaborator

msteen commented Aug 16, 2023

You should try disabling it first:
systemctl --user disable auto-fix-vscode-server.service

And then you should be able to start / stop / enable it again hopefully. Some weird cache or other mechanism that causes this. As far as I know it is a general issue and not particular to this project.

If that fails you can try:
ln -sfT /run/current-system/etc/systemd/user/auto-fix-vscode-server.service ~/.config/systemd/user/auto-fix-vscode-server.service

I have a version of this project where I have the service enabled for all users by default, but that still has some bugs that I haven't gotten around to fixing yet.

@samuela
Copy link
Author

samuela commented Aug 16, 2023

Thanks for your response @msteen !

Disabling didn't seem to work for me:

❯ systemctl --user disable auto-fix-vscode-server.service
Failed to disable unit: Unit file auto-fix-vscode-server.service does not exist.

But linking, enabling, and starting did:

ln -sfT /run/current-system/etc/systemd/user/auto-fix-vscode-server.service ~/.config/systemd/user/auto-fix-vscode-server.service
systemctl --user enable auto-fix-vscode-server.service
systemctl --user start auto-fix-vscode-server.service

Thanks again @msteen ! This module is a life saver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants