organization

This commit is contained in:
mjallen18
2024-02-24 23:08:52 -06:00
parent dc6ebf3cbb
commit f0e5baea4b
22 changed files with 811 additions and 205 deletions

View File

@@ -1,18 +1,77 @@
{ config, pkgs, ... }:
{
# nextcloud
virtualisation.oci-containers.containers."nextcloud" = {
autoStart = true;
image = "linuxserver/nextcloud";
ports = [ "9443:443" "9880:80" ];
volumes = [
"/mnt/ssd/ssd_app_data/nextcloud:/config"
"/mnt/mainpool/Nextcloud:/data"
];
environment = {
PUID = "911";
PGID = "1000";
TZ = "America/Chicago";
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.nas-apps.nextcloud;
in {
options.nas-apps.nextcloud = {
enable = mkEnableOption "nextcloud docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
httpPort = mkOption {
type = types.str;
default = "80";
};
httpsPort = mkOption {
type = types.str;
default = "443";
};
name = mkOption {
type = types.str;
default = "nextcloud";
};
image = mkOption {
type = types.str;
default = "linuxserver/nextcloud";
};
configPath = mkOption {
type = types.str;
default = "/mnt/ssd/ssd_app_data/nextcloud";
};
dataPath = mkOption {
type = types.str;
default = "/mnt/mainpool/Nextcloud";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
};
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.httpPort}:80" "${cfg.httpsPort}:443" ];
volumes = [
"${cfg.configPath}:/config"
"${cfg.dataPath}:/data"
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}