Files
nix-config/modules/apps/mealie/default.nix
mjallen18 7cc0a882db mealie
2024-07-02 10:40:19 -05:00

34 lines
648 B
Nix

{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.mealie;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.port}:9000" ];
volumes = [
"${cfg.dataPath}:/app/data"
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
ALLOW_SIGNUP = cfg.allowSignup;
MAX_WORKERS = cfg.maxWorkers;
MAX_CONCURRENCY = cfg.maxConcurrency;
BASE_URL = cfg.baseUrl;
};
};
};
}