This commit is contained in:
mjallen18
2024-06-11 11:38:20 -05:00
parent 6a561c0def
commit 7adfefae12
4 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
{
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;
};
};
};
}