{
  config,
  lib,
  namespace,
  ...
}:
with lib;
let
  name = "lubelogger";
  cfg = config.${namespace}.services.${name};

  lubeloggerConfig = lib.${namespace}.mkModule {
    inherit config name;
    serviceName = "podman-${name}";
    description = "lubelogger";
    options = { };
    moduleConfig = {
      virtualisation.oci-containers.containers.lubelogger = {
        autoStart = true;
        image = "ghcr.io/hargata/lubelogger";
        ports = [ "${toString cfg.port}:8080" ];
        volumes = [
          "${cfg.configDir}/lubelogger:/App/data"
          "${cfg.configDir}/lubelogger/keys:/root/.aspnet/DataProtection-Keys"
        ];
        environmentFiles = [
          "${cfg.configDir}/lubelogger/lubelogger.env"
        ];
        environment = {
          PUID = toString config.users.users.nix-apps.uid;
          PGID = toString config.users.groups.jallen-nas.gid;
          TZ = "America/Chicago";
        };
      };
    };
  };
in
{
  imports = [ lubeloggerConfig ];
}
