Re:What's your go to Nix/NixOS pitch?
by conception on Saturday August 12, 2023 @03:58PM
(#37103701)
What are the two commands for further reading? Not familiar with Nix.
(Not OP) cp to copy the /etc/nixos/configuration.nix file, and nixos-rebuild to build the system defined in the file on the new machine.
Or if you're sharing configuration, it's most likely a "git pull" rather than "cp".
Yes, to be specific it's a git clone and a command to apply the flake.
Re:What's your go to Nix/NixOS pitch?
by yjftsjthsd-h on Saturday August 12, 2023 @06:26PM
(#37104773)
If you're using a flake, can't you apply itfrom git in a single command?
Actually, you can! I always want to clone it either way, so I just do it.
How do you configure and install low level hardware drivers? Aren't these different on both systems? And wouldn't proprietary drivers rely on hardcoded versions of libc, for example, causing a dependency hell?
* * *
Re:What's your go to Nix/NixOS pitch?
by charcircuit on Saturday August 12, 2023 @04:12PM
(#37103813)
This is handled by having multiple config files. System specfic stuff goes into a dedicated file which wouldn't be shared.
And proprietary drivers?
I only use one, which is nvidia. It's already a nixos option, so I just set them on my configuration file.
Three options to be exact:
hardware.nvidia.modesetting.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; };
First enables nvidia modesetting, second enables the driver, and the third enables opengl, with a special flag to also enable it for 32bit stuff (like old games on steam).
I have tried multiple orchestration options before, but they always fail in some way, ansible for example always work until I have to run something from scratch, then it fails miserably because of something that changed after the 20th time I've ran the script. On Nix, that's not even a consideration.