5 ms·
Not OP, but here's my take: I have two machines, one with NixOS, one with Mac. I use the same configuration on both. Keeping both machines in sync is a matter o
by cfcosta 3y ago
Not OP, but here's my take: I have two machines, one with NixOS, one with Mac. I use the same configuration on both. Keeping both machines in sync is a matter of two commands, adding a new machine is also a matter of two commands.
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.
- amelius 3y agoHow 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?
- charcircuit 3y agoThis is handled by having multiple config files. System specfic stuff goes into a dedicated file which wouldn't be shared.
- amelius 3y agoAnd proprietary drivers?
- cfcosta 3y agoI 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).
- pxc 3y ago> wouldn't proprietary drivers rely on hardcoded versions of libc, for example, causing a dependency hell? You can have multiple copies of glibc on NixOS and it's fine as long as you don't need two different versions of it in the same process. Have you run into this on NixOS?
- conception 3y agoWhat are the two commands for further reading? Not familiar with Nix.
- Aerbil313 3y ago(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.
- viraptor 3y agoOr if you're sharing configuration, it's most likely a "git pull" rather than "cp".
- cfcosta 3y agoYes, to be specific it's a git clone and a command to apply the flake.
- yjftsjthsd-h 3y agoIf you're using a flake, can't you apply itfrom git in a single command?
- cfcosta 3y agoActually, you can! I always want to clone it either way, so I just do it.