Serives: Use sops for service secrets (heidi, kopia)
This commit is contained in:
@ -4,6 +4,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
# If we need to pass secrets to containers we can't use plain env variables.
|
||||||
|
sops.templates."TEMPLATE_secrets.env".content = ''
|
||||||
|
SECRET=${config.sops.placeholder.SECRET}
|
||||||
|
'';
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.TEMPLATE = {
|
virtualisation.oci-containers.containers.TEMPLATE = {
|
||||||
image = "TEMPLATE";
|
image = "TEMPLATE";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
@ -14,7 +19,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -31,9 +36,13 @@
|
|||||||
# NVIDIA_DRIVER_CAPABILITIES = "all";
|
# NVIDIA_DRIVER_CAPABILITIES = "all";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environmentFiles = [
|
||||||
|
config.sops.templates."TEMPLATE_secrets.env".path
|
||||||
|
];
|
||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
# "--gpus=all"
|
|
||||||
"--net=behind-nginx"
|
"--net=behind-nginx"
|
||||||
|
# "--gpus=all"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
|
@ -8,15 +8,6 @@
|
|||||||
image = "gitea.vps.chriphost.de/christoph/formula10:latest";
|
image = "gitea.vps.chriphost.de/christoph/formula10:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
|
@ -8,15 +8,6 @@
|
|||||||
image = "gitea.vps.chriphost.de/christoph/pocketbase:0.25.0";
|
image = "gitea.vps.chriphost.de/christoph/pocketbase:0.25.0";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
# "pihole"
|
# "pihole"
|
||||||
];
|
];
|
||||||
@ -41,15 +32,6 @@
|
|||||||
image = "gitea.vps.chriphost.de/christoph/formula11:latest";
|
image = "gitea.vps.chriphost.de/christoph/formula11:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
"formula11_pocketbase"
|
"formula11_pocketbase"
|
||||||
];
|
];
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
|
@ -4,19 +4,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
# If we need to pass secrets to containers we can't use plain env variables.
|
||||||
|
sops.templates."heidi_secrets.env".content = ''
|
||||||
|
DISCORD_TOKEN=${config.sops.placeholder.heidi-discord-token}
|
||||||
|
'';
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.heidi = {
|
virtualisation.oci-containers.containers.heidi = {
|
||||||
image = "gitea.vps.chriphost.de/christoph/discord-heidi:latest";
|
image = "gitea.vps.chriphost.de/christoph/discord-heidi:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
ports = [];
|
ports = [];
|
||||||
@ -28,12 +24,13 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
# TODO: I can't do this because readFile obviously doesn't
|
|
||||||
# read at runtime but at buildtime, duh...
|
|
||||||
DISCORD_TOKEN = builtins.readFile config.age.secrets.heidi-discord-token.path;
|
|
||||||
DOCKER = "True";
|
DOCKER = "True";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environmentFiles = [
|
||||||
|
config.sops.templates."heidi_secrets.env".path
|
||||||
|
];
|
||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
|
"--init" # Make an init process take up PID 1, to make python receive the SIGTERM
|
||||||
"--net=behind-nginx"
|
"--net=behind-nginx"
|
||||||
|
@ -8,15 +8,6 @@
|
|||||||
image = "ghcr.io/immich-app/postgres:15-vectorchord0.3.0-pgvectors0.2.0";
|
image = "ghcr.io/immich-app/postgres:15-vectorchord0.3.0-pgvectors0.2.0";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
ports = [
|
ports = [
|
||||||
@ -48,7 +39,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -70,15 +61,6 @@
|
|||||||
image = "ghcr.io/imagegenius/immich:latest";
|
image = "ghcr.io/imagegenius/immich:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
"immich-database"
|
"immich-database"
|
||||||
"immich-redis"
|
"immich-redis"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
# If we need to pass secrets to containers we can't use plain env variables.
|
||||||
|
sops.templates."kopia_secrets.env".content = ''
|
||||||
|
KOPIA_PASSWORD=${config.sops.placeholder.kopia-user-password}
|
||||||
|
'';
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.kopia = {
|
virtualisation.oci-containers.containers.kopia = {
|
||||||
image = "kopia/kopia:latest";
|
image = "kopia/kopia:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
@ -14,7 +19,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -65,9 +70,12 @@
|
|||||||
environment = {
|
environment = {
|
||||||
TZ = "Europe/Berlin";
|
TZ = "Europe/Berlin";
|
||||||
USER = "christoph";
|
USER = "christoph";
|
||||||
KOPIA_PASSWORD = builtins.readFile config.age.secrets.kopia-user-password.path;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environmentFiles = [
|
||||||
|
config.sops.templates."kopia_secrets.env".path
|
||||||
|
];
|
||||||
|
|
||||||
entrypoint = "/bin/kopia";
|
entrypoint = "/bin/kopia";
|
||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
@ -76,8 +84,8 @@
|
|||||||
"--disable-csrf-token-checks"
|
"--disable-csrf-token-checks"
|
||||||
"--insecure"
|
"--insecure"
|
||||||
"--address=0.0.0.0:51515"
|
"--address=0.0.0.0:51515"
|
||||||
"--server-username=${builtins.readFile config.age.secrets.kopia-server-username.path}"
|
"--server-username=$(cat ${config.sops.secrets.kopia-server-username.path})"
|
||||||
"--server-password=${builtins.readFile config.age.secrets.kopia-server-password.path}"
|
"--server-password=$(cat ${config.sops.secrets.kopia-server-password.path})"
|
||||||
];
|
];
|
||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
@ -68,15 +68,6 @@
|
|||||||
image = "ghcr.io/paperless-ngx/paperless-ngx:latest";
|
image = "ghcr.io/paperless-ngx/paperless-ngx:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
# login = {
|
|
||||||
# # Uses DockerHub by default
|
|
||||||
# # registry = "";
|
|
||||||
#
|
|
||||||
# # DockerHub Credentials
|
|
||||||
# username = "christoph.urlacher@protonmail.com";
|
|
||||||
# passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
"paperless-redis"
|
"paperless-redis"
|
||||||
"paperless-postgres"
|
"paperless-postgres"
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# DockerHub Credentials
|
# DockerHub Credentials
|
||||||
username = "christoph.urlacher@protonmail.com";
|
username = "christoph.urlacher@protonmail.com";
|
||||||
passwordFile = "${config.age.secrets.dockerhub-pasword.path}";
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
|
Reference in New Issue
Block a user