moved the previous commit files into envfiles

This commit is contained in:
2024-06-22 19:33:56 -06:00
parent 81e74871a1
commit 0cea6b3495
14 changed files with 91 additions and 73 deletions

View File

@@ -6,23 +6,17 @@ in {
options.my.servers.ryot.enable = lib.mkEnableOption "enable";
config = lib.mkIf
(config.my.servers.ryot.enable && config.my.servers.postgres.enable) {
sops.secrets = {
"ryot/twitch/id" = { };
"ryot/twitch/secret" = { };
};
sops.secrets.ryot.sopsFile = ../../secrets/env.yaml;
virtualisation.oci-containers = {
backend = "docker";
containers.ryot = {
image = "ghcr.io/ignisda/ryot:v5.5.0";
ports = [ "8765:8000" ];
environmentFiles = [ config.sops.secrets.ryot.path ];
environment = {
TZ = "America/Mexico_City";
DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}";
FRONTEND_INSECURE_COOKIES = "true";
VIDEO_GAMES_TWITCH_CLIENT_ID =
"cat ${config.sops.secrets."ryot/twitch/id".path}";
VIDEO_GAMES_TWITCH_CLIENT_SECRET =
"cat ${config.sops.secrets."ryot/twitch/secret".path}";
};
volumes =
[ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];