• 0 Posts
  • 42 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • Great points. I kinda feel the same with containerization. I have been wanting change my OS on my home server and while NixOS is great for that, I have decided to do things differently and use OpenSUSE Micro OS. My plan was actually Fedora Core OS, but after that Red Hat drama I decided to run with SUSE instead. It is an immutable distro with atomic upgrades that is designed for being a container host. It uses Ignition as the configuration for setting up things like users, services, networking, etc. My plan is then to just use containers like I was doing before on Fedora Server and for the other things to use Nix to build container images. Instead of using DockerFile, you’d use Nix Flakes to create really minimal images. Instead of starting with a full distro like Alpine, Nix starts from scratch and copies all dependencies over as specified in your flake. So the image only contains the absolute minimum to run. I think I’d be a fun side project while learning more about Ignition, Linux containers and Nix Flakes.

    As for your point on config, I think it’s just part of the trade offs of NixOS. You either have a system that can be modified easily at anytime through the shell or you have a system that you modify centrally and is fully reproducible. You can already install packages with nix-env in the command line without changing your config, but that also won’t be reproducible. Maybe a GUI app for managing your config and packages could be helpful, although I’m pretty sure that’s low priority for NixOS right now.









  • There are some really mixed answers here. I would stick to the mainline distros and not go for a fork with a few customizations. It does depend on what you want, especially if you are willing to learn using the terminal and if you want bleeding edge or more stability. My list would be:

    • Debian
    • Kubuntu
    • Fedora
    • Pop!_OS
    • Arch Linux (If you want to learn Linux from its fundamentals)



  • I can’t confirm that (I distro hopped to NixOS) I can confirm that Arch is a solid distro worth learning and will give you the skills to manage it long-term. Compared to Arch based distros like Manjaro, EndeavorOS and Garuda where people tend to screw up their install easily when installing the wrong packages from the AUR and updating with dependency conflicts.


  • You can check it using the checksum. But who does that?

    In all seriousness I am running NixOS right now using flakes. The package manager compiles everything unless a trusted source already has it compiled, in which case the package manager checks the checksum to ensure you still get the same result and downloads that instead. It also aims to be fully reproducible and with flakes it automatically pins all dependency versions so next time you build your configurations, you get the same result. It is all really cool, but I still don’t understand everything and I’m still learning it.


  • I am already trying it and I am still no expert. How I understand flakes is that it is a file with inputs, like nixpkgs and other flakes or repos you might depend on and some outputs that can be things like a nixshell with packages and environment variables, custom packages and configs like your NixOS configurations and home manager. When you use your flake for the first time, by entering a nix shell with nix develop, building a package with nix build, rebuild your NixOS system with nixos-rebuild --flake .#<hostname>, etc, nix will generate a flake.lock file that stores the hashes of all of your inputs and thus pinning the input versions. This means that if you ever run any of those commands again, you should get the same result because the inputs are pinned and the same version. If you want to update, you just run nix flake update and it will regenerate the flake.lock file with new hashes for the newest version. The advantage with flakes is that it is fully reproducible, even if one of your dependencies changes, because the hash is specified and centrally managed in the inputs of your flake.

    Nix flakes can be used for your NixOS system by adding the nixos configurations in the outputs of your nix flake and adding the dependencies like nixpkgs to the inputs. You can also combine it with home manager by either specifying it as a separate output or adding it as a nixos module inside the nixos configurations output. You just copy your existing nixos and home manager config to the folder with your flake and reference them inside the flake.nix. If you added home manager as a nixos module, you only need to run nixos-rebuild switch --flake <path-to-flake>.#<hostname> and it will automatically rebuild both your NixOS configuration and home manager configuration. You can then backup the folder with your flake and configurations by uploading them to GitHub for example.

    The best resource I found was this 3 hour video by Matthias Benaets: https://youtube.com/watch?v=AGVXJ-TIv3Y&feature=share7


  • I recently asked Bing to give some code on a pretty undocumented feature and use case. It was typing out a clear answer from a user forum, but just before it was done, it deleted everything and just said it couldn’t find anything. Tried it again in a new conversation and it didn’t even try to type it out and said the same straight away. Only when given a hint in the question from what it had previously typed, it actually gave the answer. ChatGPT didn’t have this problem and just gives an answer, even though it was a bit outdated.