Remix.run Logo
▲ nicce a day ago

Not the author of the blog, but these days self-hosting with NixOS is breeze, especially because of the AI that helps with missing documentation. Everything is fully reproducible, revertable and maintainable. You can use nix eval to check if syntax is correct before even deploying anything. And if the actual build files, changes are not applied.

Under the hood, with NixOS, you get the authors setup as described. I run some of the mentioned services as described, under NixOS, just defined by .nix files.

▲aktenlage a day ago | parent [-]

Thanks. I watched videos on NixOS recently, it sounds great. I anyway abandoned the very appealing thought of using it. The reasons are already in my comment: "not much time to tinker (two small kids)" and "I guess with AI now it would be trivial, but I'd prefer getting a blueprint already known to work in practice and actually understand the why and how.".

I think this makes me incompatible with NixOS. Either I would need to spend the time to learn it, or I wouldn't understand much of what's going on. Maybe when the kids are older.

▲nicce a day ago | parent [-]

I think the requirement:

> but I'd prefer getting a blueprint already known to work in practice and actually understand the why and how.".

from "working part" is fulfilled. It is known to be work very well and many businesses use it on scale. Even drones run NixOS because it is more reliable. But it takes time to learn, which is the main negative side. I would recommend watching a bit more before making the final decision!

▲aktenlage 21 hours ago | parent [-]

I am sure nixos works perfectly reliable. I meant a specific setup (I've the configuration as home server with immich, paperless-ngx, jellyfish, samba, ...) as I am sure there still are better and worse ways to configure such a system. Is there a good "library" of NixOS configurations?

▲nicce 20 hours ago | parent [-]

So, for most common services, you don't need a library. NixOS itself disallows invalid states and provides configuration options in pure .nix to represent the configuration of the target service regardless of how it actually works.

For example, configuring basic Immich setup is few lines of code, this also includes downloading Immich and relevant dependencies, following uses unstable channel, so using latest version:

  {
    services.immich = {
      enable = true;
      package = nixpkgs-unstable.legacyPackages ${pkgs.stdenv.hostPlatform.system}.immich;
      host = "127.0.0.1";
      port = 2283;
      mediaLocation = "/myzfs/media/immich";
      machine-learning.enable = false;
  };

  systemd.services.immich-server = {
    unitConfig.RequiresMountsFor = "/myzfs/media/immich";
    serviceConfig.ExecStartPre = [
      "+${pkgs.coreutils}/bin/install -d -m 0750 -o immich -g immich /myzfs/media/immich"
    ];
  };
}

Jellyfin is even less with defaults:

  services.jellyfin = {
    enable = true;
    openFirewall = true;
  };

  users.users.jellyfin.extraGroups = [ "media" ];

Samba is a bit more but less than 30 lines. And then you run `nixos-rebuild switch` on remote target to have previous to run as systemd services.

For those that are not part of the core NixOS, are usually provided with NixOS Home Manager: https://wiki.nixos.org/wiki/Home_Manager

Libraries are usually something more complex than single service in NixOS. Complete build pipelines for some package or specific kind of complex configuration that has many services to provide some single goal.