This commit is contained in:
mjallen18
2025-11-16 20:18:13 -06:00
parent 1c1dc71cd7
commit 34b6399d24
2 changed files with 19 additions and 18 deletions

View File

@@ -11,22 +11,24 @@ in
{
imports = [ ./options.nix ];
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [
"${cfg.port}:443"
];
volumes = [
"${cfg.configPath}:/config"
"${cfg.dataPath}:/data"
"/run/postgresql:/run/postgresql"
];
environmentFiles = [ ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [
"${cfg.port}:443"
];
volumes = [
"${cfg.configPath}:/config"
"${cfg.dataPath}:/data"
"/run/postgresql:/run/postgresql"
];
environmentFiles = [ ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}