-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Instructions unclear with home-manager managed as a flake #65
Comments
Your the second one, so I will have to agree, the README needs updating on that front. Thanks for letting me know! However, in general, you should just check the flake.nix for what it is exporting, then your answer should have been relatively obvious, granted that you have some understanding of Nix (the language) and flakes: Just replace That does not invalidate that indeed the docs need improving, so I am going to keep the issue open, such that I remember to update the README. And I should probably see if I can make the default for importing modules, not just always be nixos, but maybe I can detect when it is being imported from Home Manager and import the home module(s) instead. |
Thanks, seems to work now. Oh, I was close! I'm still a bit new both to flakes and home-manager, so I easily get lost. |
Would you be willing to test whether check if the README is sufficiently updated? And test whether your old code would just work as you had it? The branch that contains the changes is here: https://github.com/nix-community/nixos-vscode-server/tree/hm-module-import The only change in your old code would need to be: That should let you use that branch instead. I have not sufficiently tested the code yet, hence the separate branch, but the intention is that it now should import either the NixOS or HM module depending on whether you import it in a NixOS or HM configuration. |
Thanks! I tried it, but it says that this gets called with with unexpected argument 'config':
The call site seems to be this: https://github.com/NixOS/nixpkgs/blob/master/lib/modules.nix#L513 |
The README seems to show how to install
vscode-server
as a system-level module, with flakes or channels. I'm trying to install it to just one user, with home-manager managed as a flake.I expect that I need to specify
vscode-server.url = "github:nix-community/nixos-vscode-server";
as my input in.config/home-manager/flake.nix
. The next problem is, how am I supposed to "install" or enable the module to be able to enable the service in~/.config/nixpkgs/home.nix
? I tried to add it to themodules
list, but got a "vscode-server
is a flake" error. Next, I reasoned that the module is an output of the flake, but this backfires too.I'm lost how to proceed, please help. (And let's possibly, update the README too, I think that using flakes with home-manager is getting more and more common!)
The text was updated successfully, but these errors were encountered: