zion/modules/containers.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-16 18:05:48 +02:00
{
config,
lib,
pkgs,
...
}:
{
# Podman setup
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
extraPackages = with pkgs; [ zfs ];
};
oci-containers = {
backend = "podman";
containers = {
# Openbooks configuration
openbooks = {
image = "evanbuss/openbooks@sha256:4fa9188885368c2303b7dc527d48b3159aaa7022010e29b3ed96842018793590";
ports = [ "127.0.0.1:9000:80" ];
2023-12-05 11:17:57 +01:00
cmd = [
"--name"
"bradar"
"--searchbot"
"searchook"
"--persist"
"--tls"
"false"
2023-12-05 11:17:57 +01:00
];
};
2023-04-12 11:52:58 +02:00
# Prometheus MQTT integration
mqtt2prometheus = {
image = "hikhvar/mqtt2prometheus@sha256:8e166d36feaa5ddcad703eef3a2c5167a154d6eef306a40fe6509861580c0714";
2023-04-12 11:52:58 +02:00
ports = [ "127.0.0.1:9641:9641" ];
volumes = [ "/vault/mqtt2prometheus/config.yaml:/config.yaml" ];
};
};
};
};
2023-05-24 14:15:15 +02:00
2023-06-08 18:30:16 +02:00
# Start services after ZFS mount
2024-07-16 18:05:48 +02:00
systemd.services.podman-mqtt2prometheus.unitConfig.RequiresMountsFor = [ /vault/mqtt2prometheus ];
}