2024-08-16 09:52:29 -04:00
|
|
|
{ ... }:
|
|
|
|
|
2024-08-17 21:49:31 -04:00
|
|
|
let
|
|
|
|
vars = import ../vars.nix;
|
|
|
|
restic_path = "${vars.primary_backups}/restic";
|
|
|
|
in
|
2024-08-16 09:52:29 -04:00
|
|
|
{
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
restic = {
|
|
|
|
image = "restic/rest-server:latest";
|
2024-08-17 21:49:31 -04:00
|
|
|
volumes = [ "${restic_path}:/data" ];
|
2024-08-16 09:52:29 -04:00
|
|
|
environment = {
|
|
|
|
OPTIONS = "--prometheus --htpasswd-file /data/.htpasswd";
|
|
|
|
};
|
|
|
|
ports = [ "8010:8000" ];
|
|
|
|
extraOptions = [
|
|
|
|
"--restart=always"
|
|
|
|
"--network=restic_restic"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
grafana = {
|
|
|
|
image = "grafana/grafana:latest";
|
|
|
|
extraOptions = [
|
|
|
|
"--restart=always"
|
|
|
|
"--network=haproxy-net"
|
|
|
|
];
|
|
|
|
volumes = [
|
|
|
|
"grafanadata:/var/lib/grafana"
|
2024-08-17 21:49:31 -04:00
|
|
|
"${restic_path}/dashboards:/dashboards"
|
|
|
|
"${restic_path}/grafana.ini:/etc/grafana/grafana.ini"
|
2024-08-16 09:52:29 -04:00
|
|
|
];
|
|
|
|
environment = {
|
|
|
|
GF_USERS_DEFAULT_THEME = "dark";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|