ryan4yin / nix-config

❄️ My nix config for both desktops(NixOS+macOS) and homelab servers(NixOS).
https://nixos-and-flakes.thiscute.world
MIT License
977 stars 56 forks source link

easy multiuser request #153

Closed Sparkxxx closed 2 months ago

Sparkxxx commented 2 months ago

Hi Ryan,

A big Thank You from me, for you, for the wonderfull, mindfull and well thought setup, and the support you offered to people joining Nix(OS). It was steep but it is worthing every day spent on understanding, learning and trying, and your notes really help a lot along the way.

I've finally managed to build my computer with wayland KDE plasma6 and I am so pleased with the result that I decided to spread the nix to my sons' computers but for this to happen I would need a way to setup the username for each specific host in the /hosts/$hostname/files or in the /outputs/$hostname since these are the files that would imply creating a new system.

As I see it now, there is only a single user defined in /vars/default.nix that would have to be deployed on all generated hosts and this is the only shortcoming that I see in the setup, that I see as the most comprehensive and evolved from what I've found so far. I've even been able to create a k3s cluser on selfhosted PVE and deploying the flux repo (fighting with this for the moment).

I admit that after 2 months, I still don't get all the complexity of the system right and even though trying to develop this feature I failed and I am kindly asking for your help.

My 2 cents vison on how I see it it would be that I can choose to define a custom username somewhere in host definition files or leave it for the default in "${myvars.username}" but you reign supreme on the final decision of the implementation of this feature.

ryan4yin commented 2 months ago

Thank you so much for your kind words and positive feedback. Here are some improvement ideas:

  1. Multi-User may be a false requirement: For personalized system control, consider duplicating the base Nix(OS) configuration for your son to modify as he wish. This allows them to set up unique usernames and customize their systems independently.
  2. My main branch's Flake Outputs may be too heavy and complex for personal use: There is no need to copy my nix-config structrue when you just have a small number of machines, especially for your son. my i3-kickstarter branch may be a better start point, I've just added a multi-user demo into this branch.

Would love to hear your thoughts on these ideas.

Best, Ryan

Sparkxxx commented 2 months ago

Thank you very much Ryan,

You are right, it makes little sense to implement the muli-user strategy for the main config. I cloned the branch to a new repo so that I can mess with it. I really like the way of the intermediary flake and impermanence so I will try and implement those too. I'll provide you the link to the repo once it is something to discuss about. I will be away for the next days. Have a great weekend.