Files
nix-config/modules/apps/beszel-agent/default.nix
mjallen18 bf7671871e beszel
2024-07-26 11:04:46 -05:00

33 lines
600 B
Nix

{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.beszel-agent;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.port}:45876" ];
volumes = [
"${cfg.podmanSock}:/var/run/docker.sock:ro"
];
environment = {
PORT = cfg.port;
KEY = cfg.key;
FILESYSTEM = cfg.fileSystem;
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}