initial postgres arr migration
This commit is contained in:
@@ -6,6 +6,17 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
vars = import ../vars.nix;
|
vars = import ../vars.nix;
|
||||||
|
arr_postgres_config =
|
||||||
|
container_type:
|
||||||
|
let
|
||||||
|
ctype = lib.strings.toUpper container_type;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"${ctype}__POSTGRES__HOST" = "host.docker.internal";
|
||||||
|
"${ctype}__POSTGRES__USER" = "SOPS_ONLY";
|
||||||
|
"${ctype}__POSTGRES__PASSWORD" = "SOPS_ONLY";
|
||||||
|
"${ctype}__POSTGRES__PORT" = toString config.services.postgresql.settings.port;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
@@ -16,12 +27,19 @@ in
|
|||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
|
POSTGRES_HOST = "host.docker.internal";
|
||||||
|
POSTGRES_USER = "SOPS_ONLY";
|
||||||
|
POSTGRES_PASSWORD = "SOPS_ONLY";
|
||||||
|
POSTGRES_PORT = toString config.services.postgresql.settings.port;
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"${vars.primary_docker}/bazarr:/config"
|
"${vars.primary_docker}/bazarr:/config"
|
||||||
"${vars.primary_plex_storage}/data:/data"
|
"${vars.primary_plex_storage}/data:/data"
|
||||||
];
|
];
|
||||||
extraOptions = [ "--network=arrnet" ];
|
extraOptions = [
|
||||||
|
"--network=arrnet"
|
||||||
|
"--add-host=host.docker.internal:host-gateway"
|
||||||
|
];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
prowlarr = {
|
prowlarr = {
|
||||||
@@ -31,7 +49,8 @@ in
|
|||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
}
|
||||||
|
// arr_postgres_config "prowlarr";
|
||||||
extraOptions = [ "--network=arrnet" ];
|
extraOptions = [ "--network=arrnet" ];
|
||||||
volumes = [ "${vars.primary_docker}/prowlarr:/config" ];
|
volumes = [ "${vars.primary_docker}/prowlarr:/config" ];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
@@ -43,7 +62,8 @@ in
|
|||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
}
|
||||||
|
// arr_postgres_config "radarr";
|
||||||
volumes = [
|
volumes = [
|
||||||
"${vars.primary_docker}/radarr:/config"
|
"${vars.primary_docker}/radarr:/config"
|
||||||
"${vars.primary_plex_storage}/data:/data"
|
"${vars.primary_plex_storage}/data:/data"
|
||||||
@@ -58,7 +78,8 @@ in
|
|||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
}
|
||||||
|
// arr_postgres_config "sonarr";
|
||||||
volumes = [
|
volumes = [
|
||||||
"${vars.primary_docker}/sonarr:/config"
|
"${vars.primary_docker}/sonarr:/config"
|
||||||
"${vars.primary_plex_storage}/data:/data"
|
"${vars.primary_plex_storage}/data:/data"
|
||||||
@@ -73,7 +94,8 @@ in
|
|||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
}
|
||||||
|
// arr_postgres_config "lidarr";
|
||||||
volumes = [
|
volumes = [
|
||||||
"${vars.primary_docker}/lidarr:/config"
|
"${vars.primary_docker}/lidarr:/config"
|
||||||
"${vars.primary_plex_storage}/data:/data"
|
"${vars.primary_plex_storage}/data:/data"
|
||||||
@@ -100,7 +122,8 @@ in
|
|||||||
user = "600:100";
|
user = "600:100";
|
||||||
environment = {
|
environment = {
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
}
|
||||||
|
// arr_postgres_config "notifiarr";
|
||||||
environmentFiles = [ config.sops.secrets."docker/notifiarr".path ];
|
environmentFiles = [ config.sops.secrets."docker/notifiarr".path ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"${vars.primary_docker}/notifiarr:/config"
|
"${vars.primary_docker}/notifiarr:/config"
|
||||||
@@ -115,6 +138,11 @@ in
|
|||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
|
DB_TYPE = "postgres";
|
||||||
|
DB_HOST = "host.docker.internal";
|
||||||
|
DB_PORT = toString config.services.postgresql.settings.port;
|
||||||
|
DB_USER = "SOPS_ONLY";
|
||||||
|
DB_PASS = "SOPS_ONLY";
|
||||||
};
|
};
|
||||||
volumes = [ "${vars.primary_docker}/overseerr:/config" ];
|
volumes = [ "${vars.primary_docker}/overseerr:/config" ];
|
||||||
# TODO: remove ports later since this is going through web
|
# TODO: remove ports later since this is going through web
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
daily = 30;
|
daily = 30;
|
||||||
weekly = 0;
|
weekly = 0;
|
||||||
monthly = 6;
|
monthly = 6;
|
||||||
yearly = 3;
|
yearly = 2;
|
||||||
autosnap = true;
|
autosnap = true;
|
||||||
autoprune = true;
|
autoprune = true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user