26 lines
572 B
Nix
26 lines
572 B
Nix
{ lib, 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;
|
|
};
|
|
};
|
|
};
|
|
}
|