fruitbasket/modules/decisions.nix

47 lines
1 KiB
Nix
Raw Permalink Normal View History

2024-10-08 21:36:52 +02:00
{ config, ... }:
2024-02-03 20:05:52 +01:00
let
domain = "decisions.${config.networking.domain}";
in
{
2024-02-03 20:17:06 +01:00
sops.secrets."decisions_env" = { };
2024-02-03 20:05:52 +01:00
virtualisation.oci-containers = {
2024-02-04 13:08:14 +01:00
containers.decisions = {
2024-05-06 11:08:41 +02:00
image = "ghcr.io/fsr/decisions";
2024-02-03 20:05:52 +01:00
volumes = [
"/var/lib/nextcloud/data/root/files/FSR/protokolle:/protokolle:ro"
];
2024-05-19 11:41:38 +02:00
extraOptions = [ "--network=host" ];
2024-02-03 20:17:06 +01:00
environmentFiles = [
2024-02-22 12:20:21 +01:00
config.sops.secrets."decisions_env".path
2024-02-03 20:17:06 +01:00
];
2024-02-03 20:05:52 +01:00
};
};
services.nginx = {
virtualHosts."${domain}" = {
locations."/" = {
proxyPass = "http://127.0.0.1:5055";
};
};
};
2024-02-04 13:07:41 +01:00
systemd.timers."decisions-to-db" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "01:11:00";
Unit = "decisions-to-db.service";
};
};
2024-07-05 13:25:22 +02:00
# systemd.services."decisions-to-db" = {
# script = ''
# set -eu
# ${pkgs.podman}/bin/podman exec decisions python tex_to_db.py
# '';
# serviceConfig = {
# Type = "oneshot";
# User = "root";
# };
# };
2024-02-03 20:05:52 +01:00
}