# services/memos.nix — Lightweight self-hosted notes at notes.nordhammer.it
# Uses Flatnotes with auth disabled — Authelia is the only gate.
{ config, lib, ... }:
{
  config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {

    virtualisation.oci-containers.containers.flatnotes = {
      image = "dullage/flatnotes:latest";
      ports = [ "127.0.0.1:5230:8080" ];
      volumes = [ "/var/lib/flatnotes:/app/data" ];
      environment = {
        FLATNOTES_AUTH_TYPE = "none";
      };
    };

    systemd.tmpfiles.rules = [
      "d /var/lib/flatnotes 0750 root root -"
    ];
  };
}
