Files
nix-config/modules/nixos/services/nextcloud/default.nix
mjallen18 34b6399d24 pin rev
2025-11-16 20:18:13 -06:00

35 lines
630 B
Nix

{
lib,
config,
namespace,
...
}:
with lib;
let
cfg = config.${namespace}.services.nextcloud;
in
{
imports = [ ./options.nix ];
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;
};
};
};
}