librephoenix / nixos-config

Nix noob trying to build his system
GNU General Public License v3.0
452 stars 36 forks source link

Questions about hardware configuration #8

Open PlaneTraveller opened 4 months ago

PlaneTraveller commented 4 months ago

Hi! I'm a new nix user migrating from arch, trying to learn about the best practices of modularizing my systems, so this is more of a question than an issue.

I couldn't help but notice that you imported the same hardware-configuration.nix for all your profiles. Are you using the same disk for all your systems? Why is it that the disk uuid persists through the different hardware? Is there a good reason why you are using the same configuration for (presumably different) hardware?

Extracting settings like username, hostname, or profile into flake.nix is really elegant! But how do you use version control tools to sync the config between different systems? For example, for different machines, the hostname and profile might be different. Do you manually change them to the default one before pushing and pulling?

Have you considered using snowfall to manage everything? It seems like a really elegant solution, but I'm too noob to find out.

Thank you so much for your config! I'm a hyprland + doom emacs user too! I really learned a lot from your config about managing hyprland and doom with nix.

librephoenix commented 2 weeks ago

Thanks for the comment! I actually don't use the same hardware-configuration.nix for every system.

Essentially, the way I manage config on multiple systems is a bit hacky, but it goes something like this:

The main reason I use this hacky setup is that every other computer I install my config to has settings that I don't want to share publicly XD Until I setup a way to manage those settings as secrets, I'm probably going to stay with this setup.

So essentially I use my config here as a starting point, and tweak individual pieces as necessary for other machines.

Thanks for the snowfall recommendation! I don't know much about it, but from a cursory glance it looks really cool! I'll have to spend some time figuring it out!