the awful.systems server cluster runs on an open infrastructure based on NixOS and Nix flakes, and though it desperately needs cleanup in some places, it’s still a pretty good example of how to use a Nix flake to deploy NixOS in production. feel free to browse the repo and ask any questions about how it works, or about Nix in general!

also, if I get hit by a bus, this can be used to redeploy awful.systems elsewhere. an existing admin who isn’t in the hospital or the grave can import a database backup and get back up and running!

and as always, contributions are welcome.

  • sinedpick@awful.systems
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    8 months ago

    Is there a reason you define one NixOS module each for Lemmy dev/staging/prod? Why not just have one module and take an “environment” enum option?

    • self@awful.systemsOPM
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      my reasoning at the time was:

      • I was in a hurry
      • I didn’t know how much the environments would differ, so I wanted to retain as much flexibility as I could get

      the most likely future for those modules is that they’ll end up replaced by a module exported from the Lemmy flake, which’ll provide a set of options to configure multiple environments. that should clean up some of the messiest parts of the configuration, and it’d allow us to import different versions of the flake for each environment. it’d also keep the module in sync with the specific version of Lemmy it’s configuring, which is very nice to have.