User management with "firstname.lastname" user

I’d like to start using home manager on my work machine. My username (which I do not control) is of the form “firstname.lastname”, which means that I get problems when I try to add it my configuraiton.nix file:


The above does not compile and returns

error: syntax error, unexpected invalid token, expecting '.' or '='

How can I escape the full stop? Thanks

Home manager doesn’t even have the users.users hirarchy of options, what are you trying to do?

Aside of that, if there are characters in an attribute name that would break tokenisation, you have to quote them, eg.: users.users."firstname.lastname".

Thanks for your response, I am aware that home manager doesn’t have that option.
However I have seen from several sources online that nix-darwin users had to also set users.users. I omitted that from my original post.

In any case, my issue is now solved - thanks!

1 Like
Hosted by Flying Circus.