4 ms·
I was going to suggest NixOS. It's a bit of a climb to learn it, but having a modular setup that works with all my devices is absolutely a killer-app. My deskto
by talldayo 3y ago
I was going to suggest NixOS. It's a bit of a climb to learn it, but having a modular setup that works with all my devices is absolutely a killer-app. My desktop, laptop, VPS and Raspberry Pi all share the same terminal configuration from the same Git repo.
Waxing poetic about NixOS on HN is a horse well-beaten. Just try it, if you've got an extra machine laying around and a few hours to spare. I think it's a great halfway option for people that want complex server composition software without the Kubernetes built-in.
- eh8 3y agoLate to the party but this is my configuration that I use for my home servers: https://github.com/eh8/chenglab https://github.com/eh8/chenglab I was a complete Nix beginner three months ago and thought Nix was terribly complicated and unnecessary. Glad to say I was wholly wrong and the transition was not that bad. NixOS me provision my servers from scratch to functional file/media/home automation server in about 15 minutes using an entirely automated Nix installation process. It’s a beautiful OS for servers
- exe34 3y agoOh and if you don't want to go full nixos, you can just install whatever the base image for your server from the provider and run nix as a separate install for your applications.
- scott01 3y agoThis is quite interesting, thanks for recommendation, I'll investigate this. Are you aware of any edge cases or inconveniences of this approach I can keep in mind while experimenting?
- exe34 3y agoWell nixos is really great if your package and options are already thought through by the maintainers, although you might have to read through nixpkgs for options. It's more painful if you need X compiled with Y enabled and it needs to rebuild (might be slow on vps), and if your package isn't included at all, it can be a pain to add a new one and get all the dependencies included. Once it works though, it basically never breaks - you can always pick an older working version. Oh and it eats disk space like there's no tomorrow if you have multiple generations retained.
- anon291 3y agoI will echo you. I use nix and kubernetes and have achieved great success. I have my configuration as nixos modules. Making a host a kubernetes controller is just a false -> true flip. All my images are built and stored and served via tftp and a remote nix store for the servers to boot. Very easy to build the system and then do atomic upgrades. Best part is ... Rollbacks if the config is bad are easy and fool proof. I would never use mutable distributions in production. Too scary. My nix boxes need very little minding.
- kevincox 3y agoI strongly agree. NixOS is a league above things like Ansible that are highly mutable. Also getting started with NixOS really isn't that bad. Just read the wiki and set a few options. https://search.nixos.org/options https://search.nixos.org/options The hard part about NixOS is when you need to package something yourself. That can have a bit of a learning curve but since nixpkgs is the largest package repository you rarely need to do it. If you are running custom stuff you can always start by just using NixOS to run a Docker container. At least that will be a reproducable OS and if you pin a specific image it will be fully reproducible. Then when you want to you can dip your toes into native Nix packages. (It really isn't that bad, just an extra thing to learn that you can defer to start)
- _dain_ 3y ago>Just read the wiki note, there are two wikis now.
- talldayo 3y agoAgreed fully! Just got finished packaging up a few desktop apps for the first time on NixOS and it wasn't as bad as I expected. My biggest issue with Nix (as is everyone's I hear) is the mediocre documentation. It takes a lot of wheel-spinning to get up-to-speed with PKGBUILD or makefile knowledge. A lot of that difficulty curve could be remediated with better, flake-focused packaging tutorials. Surely though, that too will be Coming Soon™.
- scott01 3y agoMost cloud providers don't provide NixOS, e.g. I use OVH Cloud. IIUC, there is a way to run a script that will delete my OS and install Nix, but I think there might be side effects like cloud-specific network setup which will probably be too much for me :) Edit: But NixOS looks really good, I have to agree. I guess 'immutability' will let me just install and forget about it.
- talldayo 3y ago> IIUC, there is a way to run a script that will delete my OS and install Nix There is! It's a fucking nightmare: https://xiaoyehua.dev/posts/nixos-on-oracle-arm-machine https://xiaoyehua.dev/posts/nixos-on-oracle-arm-machine It works though, and thanks to the genius that wrote this script I've got a 4 core 24gb Oracle Always Free instance loaded up with NixOS at all hours of the day. I feel spoiled.
- pxc 3y agoI think they're referring to this implementation: https://github.com/nix-community/nixos-anywhere https://github.com/nix-community/nixos-anywhere but cleverca22's work is solid as well there's also the earlier https://github.com/elitak/nixos-infect https://github.com/elitak/nixos-infect and the built-in NIXOS_LUSTRATE: https://nixos.org/manual/nixos/stable/#sec-installing-from-other-distro https://nixos.org/manual/nixos/stable/#sec-installing-from-o... I'd go with nixos-anywhere, personally