4 ms·
NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible; combine that with Git versioning for dotfiles and a NAS for bac
by jchw 7y ago
NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible; combine that with Git versioning for dotfiles and a NAS for backups and large storage and your setup should be pretty easy to manage.
- vaibhavsagar 7y ago+1 for NixOS, it changed the way I approach my personal computer.
- chrissoundz 7y agoNixos + storing dotfiles using the simple technique described here (essentially a git repo stored in something other than .git): https://www.atlassian.com/git/tutorials/dotfiles https://www.atlassian.com/git/tutorials/dotfiles With the above, the most difficult step in getting a new system installed is now only typing in the WIFI password, drivers and the filesystem partitions...
- bamboozled 7y agoSame this is what I use, and I've not looked back since. NixOS definitely has a slight learning curve, I find it quite intuitive to use but after time you get the hang of it.
- whateveracct 7y agoNixOS is exactly what the OP is describing. It isn't super user-friendly but once you learn & get things working, the fact that it's code means you can have things working forever.
- edude03 7y agoNixOS + Home Manager + storing your config in dotfiles is exactly what you want :)
- deleted 7y ago[deleted]
- gitgud 7y ago> NixOS can be helpful here, by making all of the non-user-specific stuff completely reproducible How is this different from say Debian's "apt" package manager? You can specifically reproduce the system by downloading all versions of the packages you have, right?
- jchw 7y agoConsider reading the NixOS documentation if you would like to learn more, because it’s worth it imo, but no, Debian is a different case. NixOS doesn’t just manage packages, it manages the entire system holistically. You effectively have a single configuration file (or multiple) that configure every package, service, mount, ramdisk, driver, etc. If I delete everything but my home folder, my configuration file can be used to completely recreate the root and all of its configurations. Have a KVM GPU passthrough? That can be expressed. Want to override bashrc or zshrc globally? Yep. Want to setup users, LDAP, Samba, FTP? Same configuration. It goes as far as to make most files read only so that you can’t accidentally change things. But it goes further with build reproducibility. All builds are hashed with their inputs. Every package specifies the sha256 sum of their sources. If your package builds on one machine, it shall build on another. But it keeps going further. NixOS eschews normal shared library paths. Binaries always refer to Nix store paths in their runpath, making sure it will only ever load the version of the library it was built to load. And there is still more. NixOS tracks generations. Any time you rebuild the system to change a config or add a new package to the root, you get a new generation that can be rolled back. The default bootloader lets you choose what generation to boot. So if you mess up your configuration, you very rarely need recovery media. It may not seem very important, but it pretty much changes how you interact with your OS. If you want to restart from scratch, just make sure you have copies of your home folder and configs and start over. This is great for switching to LVM or deciding to use LUKS, where it may not be easy to do without reformatting. It does take investment, but if you have multiple machines it becomes amortized. I’m running 3 machines with largely identical setups.
- gitgud 7y agoWow, thanks for the detailed response. Yes it sounds like they've taken great care for reproducibility, which I greatly appreciate. Sounds very similar to Docker's philosophy, where changes to the system produce incremental changes to the system image and all dependencies are strictly controlled. What else do I need to be convinced to leave my Ubuntu system for NixOS?
- crispinb 7y agoNixOS looks quite fascinating. I'm on Windows for the time being, but will give NixOS a go some time. For any other WSL users here, it's worth keeping an eye on this issue: https://github.com/NixOS/nixpkgs/issues/30391 https://github.com/NixOS/nixpkgs/issues/30391 (NixOS being packaged up as a WSL distro).
- trax 7y agoNixOS + HomeManager is the best setup for reproducible setups, bar none.
- mkingston 7y agoNixOS is great. I use it as my daily driver. But. In my experience, your distro will never have all the software you would like in its repos. And I've found this is true of NixOS also. So it should be mentioned that some software does not play nicely with it [0][1]. Because some things will be missing from distro repos, packaging is, to me, quite a valuable skill. Compare, for example, the packages for autorandr for Nix and Arch [2][3]. When I started using Arch I found the Arch package fit much better within my understanding of the world. I expect most here would find the same. Here is what is essentially the manual for Nix packaging [4]. Personally I'd say that if you're unwilling to consume that, eventually you are going to encounter a frustrating problem with Nix that you cannot solve, and potentially regret using it. Though, using a VM or potentially a container might get you around some/many of those issues. I should also mention that Nix Pills may be worth a read before beginning to use NixOS- it's what convinced me to switch, in fact. [0] https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos https://unix.stackexchange.com/questions/522822/different-me... [1] https://github.com/NixOS/nixpkgs/issues/36759 https://github.com/NixOS/nixpkgs/issues/36759 [2] https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=autorandr-git https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=autor... [3] https://github.com/NixOS/nixpkgs/blob/e380ef398761206954e51426d16a328eaba27fce/pkgs/tools/misc/autorandr/default.nix https://github.com/NixOS/nixpkgs/blob/e380ef398761206954e514... [4] https://nixos.org/nixos/nix-pills/ https://nixos.org/nixos/nix-pills/
- jchw 7y agoI’ve had no issue contributing to fix small holes in NixOS, and Docker covers the rest. So far the only thing that I’ve found genuinely challenging is getting complex binary software running. I have a Nix expression for IDA free but it can only use bundled Qt. VMWare Workstation I outright can’t use, which is a shame since I have a Pro license, but it woke me up to how great KVM is, so there’s that. I would not recommend NixOS to everyone, but I definitely would recommend it to the type of person who wants to automate their system.