What's your self-hosting success of the week?

https://lemmy.org/post/4363381

What's your self-hosting success of the week? - Lemmy.org

Lemmy

I got a test box set up with nixos and a config that runs all of my services. I wanted to test the declarative rebuild promise of it, so I:

  • Filled the services with my some of my backed up data (a copy of the data, not the actual backup)
  • Ran it for a few days using some of the services
  • Backed up the data of the nixos test server, as well as the nixos config
  • Reinstalled nixos on the test box, brought in the config, and rebuilt it.
  • And it worked!!! All serviced came back with the data, all configuration was correct.

    I’m going to keep testing, and depending on how that goes I may switch my prod server and nas to nixos.

    Very cool!

    Re: the backup / restore of state in NixOS: I found myself writing the same things over and over again for each VM/service, so finally wrote this wrapper module (in action e.g. here for Jellyfin), which confgures both the backup services and timers, as well as adding a simple rsync-restore-jellyfin command to the system packages. In case you find this useful and don’t already have your own abstractions, or a sufficiently different use case 😄

    nix/modules/nixos/rsync.nix at main · charludo/nix

    Contribute to charludo/nix development by creating an account on GitHub.

    GitHub
    This is great! Thanks