jakehamilton / config

One Nix flake to rule them all.
Other
360 stars 21 forks source link

Multi-User? #8

Closed usmcamp0811 closed 4 months ago

usmcamp0811 commented 1 year ago

I'm impressed with your recent work in fully integrating standalone home-manager support. I'm curious if you might have any insights or suggestions on how to handle multi-user scenarios, specifically with LDAP. In my current setup, I rely on an LDAP user as my primary account across all systems. I adopted this approach to overcome the challenges of synchronizing user data across different distributions, which previously led to NFS permission issues. My current solution involves configuring a local user in my Nix setup and properly setting up LDAP. I then utilize home-manager's standalone mode to individually configure the LDAP user. While this method is functional, I'm exploring ways to streamline the configuration of both a local user and at least one LDAP user within my config flake (which, I've heavily borrowed from here 😀). Any thoughts or guidance would be greatly appreciated but don't want you to feel like I'm asking you to go do anything. I'm still learning Nix and just looking to see if you had any ideas.

Thanks

usmcamp0811 commented 1 year ago

Of course.. I muck with this all day and right after I decided to ask some questions I think I figured it out. Seems I am able to make a user config in ./homes/x86_64-linux/<username>@<fictional hostname> and nothing complains and I can still do things like nix run .\#homeConfigurations.mcamp@ldap.activationPackage.

Still curious your thoughts, but feel free to close this..

jakehamilton commented 10 months ago

Hey there! I'm not too familiar with this kind of setup unfortunately. I think you may have found a solution that works (even if it's not perfect) with custom homes and executing the activation script manually.

I have had multi-user on my mind, but beyond the current support in Snowfall Lib I don't think anything will be changing for a while.

adarah commented 5 months ago

I don't quite get the details of OPs setup, but I managed to get two different home-manager users working in the same host with the dev branch of snowfall lib: https://github.com/snowfallorg/lib/issues/44

jakehamilton commented 4 months ago

I'm going to close this issue out. As @adarah mentioned, the dev branch of Snowfall Lib (and therefore the v3 release when it is out) supports home-manager more fully and can enable a multi-user setup. I don't have plans to do so in my config since I'm the only user, but I believe that all the tools are in place to make it happen now!

bestlem commented 4 months ago

I think the thing that is needed for multi-user is some documentation of where you set user. For example in your config you have two user options defined one in home and one in nixes plus I think in the library you explicitly call some user/default.nix