Files
nix-config/modules/apps/puter/default.nix
mjallen18 7adfefae12 puter
2024-06-11 11:38:20 -05:00

31 lines
535 B
Nix

{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.puter;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.httpPort}:4100" ];
volumes = [
"${cfg.configPath}:/etc/puter"
"${cfg.dataPath}:/var/puter"
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}