Files
nix-config/modules/apps/manyfold/default.nix
mjallen18 c42e4f5a98 fix icons
2024-08-26 16:54:22 -05:00

38 lines
1.1 KiB
Nix

{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.manyfold;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.httpPort}:3214" ];
extraOptions = [
"--cap-drop=ALL"
"--cap-add=CHOWN"
"--cap-add=DAC_OVERRIDE"
"--cap-add=SETUID"
"--cap-add=SETGID"
"--security-opt=no-new-privileges:true"
];
volumes = [
"${cfg.configPath}:/config"
"${cfg.dataPath}:/libraries"
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
# For postgres or mariadb use <scheme>://<username>:<password>@<hostname>:<port>/<db name> where <scheme> is postgresql or mysql2
DATABASE_URL = "sqlite3:/config/manyfold.sqlite3";
# REDIS_URL = "redis://10.0.1.18:6380/0"; # redis://<hostname>:<port>/<db number>
};
environmentFiles = [ config.sops.secrets."jallen-nas/manyfold/secretkeybase".path ];
};
};
}