-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add option to enable the service for all users #83
base: master
Are you sure you want to change the base?
Conversation
Just as a sanity check is there a reason the scope of this is only to enable the service for all users? |
No that wouldn't be a big change and it would also make sense. I would be willing to merge a PR to this branch to my fork though 😊 |
understandable, maybe its time to look into finding the right person to ask about managing nix-community here given they seem both unable to work on the repo and unwilling (?) to allow someone else to. unfortunate, guess I'll get to solving this elsewhere |
@Ten0 Due to various reasons I don't want to continue working on this project. I asked before (in matrix), without success, but now someone looked into it and turned out I wasn't admin of my own project (explained why I could not find the settings page no matter what I tried). I just invited you as maintainer. |
Thanks! 😊 |
Hey, thanks so much for taking over! so is this getting merged? Edit: I just saw that this was a very recent development, so take your time haha |
8d73bcc
to
be0d05d
Compare
be0d05d
to
b5a62ed
Compare
@fsnkty does the new proposed interface look good to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation comments are suggestions,
expecting the user attribute name to match its .name
value however really should be addressed, I don't believe its an uncommon practice
otherwise all seems good to me bar some practices I don't fully understand that aren't related to this PR.
thank you for working on this
c0b7edb
to
d7ad842
Compare
d7ad842
to
725f14e
Compare
let | ||
forEachUser = ({ path, file }: builtins.listToAttrs | ||
(builtins.map | ||
(username: let user = config.users.users.${username}; in { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unable to get this to work as expected both config.users.users.foo.name
and "bar"
fail.
when e.g.. config.users.users.foo.name = "bar"
for reference users.groups.<name>.members
handles this correctly, may be useful to take a look at that.
thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please expand on how it "doesn't work as expected"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please expand on how it "doesn't work as expected"?
I have config.users.users.main.name = "fsnkty"
setting services.vscode-server.enableForUsers.users = [ config.users.users.main.name ];
breaks this in that
error: attribute 'fsnkty' missing
at /nix/store/fbgf31l3gy506di92bbw12aw95jg4cs6-source/modules/vscode-server/default.nix:20:37:
19| (builtins.map
20| (username: let user = config.users.users.${username}; in {
| ^
21| name = "${user.home}/${path}";
giving "fsnkty" breaks in the same way, the string "main" can be used but that's non ideal and doesn't behave similarly to any other option that Ive encountered which expects a list of users.
this workaround in using the user attribute name as a string instead of its given name is non ideal because now changing that value is separate from changing it anywhere else a user is specified or named
Resolves #69
Resolves #65
What it does:
services.vscode-server.enableForUsers.enable = true
is specified and usingnixos-vscode-server
as a NixOS module, usestmpfiles
to setup the appropriate symlinks to enable the service for all regular usersnixos-vscode-server
as a home-manager module in combination with flakes