Files
nix-config/hosts/nas/apps/netbootxyz/default.nix
mjallen18 3ebbbb7f90 cleanup
2025-04-15 21:19:16 -05:00

26 lines
577 B
Nix
Executable File

{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.netbootxyz;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.${cfg.name} = {
autoStart = true;
image = cfg.image;
volumes = [ "${cfg.configPath}:/config" "${cfg.assetsPath}:/assets" ];
ports = [ "${cfg.port}:3000" "69:69" "${cfg.port2}:80" ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
WEB_APP_PORT = cfg.port;
NGINX_PORT = cfg.port2;
};
};
};
}