feat(uptime-kuma): add enable option

This commit is contained in:
2026-05-22 20:20:46 +02:00
parent 7324873ef9
commit e0e51558b7

View File

@@ -1,30 +1,36 @@
{ {
lib,
config,
pkgs, pkgs,
... ...
}: }:
{ {
virtualisation.oci-containers = { options."uptime-kuma".enable = lib.mkEnableOption "uptime-kuma";
backend = "docker";
containers.uptime-kuma = { config = lib.mkIf config."uptime-kuma".enable {
image = "louislam/uptime-kuma:latest"; virtualisation.oci-containers = {
ports = [ "127.0.0.1:3001:3001" ]; backend = "docker";
volumes = [ "/var/lib/uptime-kuma:/app/data" ]; containers.uptime-kuma = {
environment = { image = "louislam/uptime-kuma:latest";
TZ = "UTC"; ports = [ "127.0.0.1:3001:3001" ];
UMASK = "0022"; volumes = [ "/var/lib/uptime-kuma:/app/data" ];
environment = {
TZ = "UTC";
UMASK = "0022";
};
extraOptions = [
"--network=proxiable"
];
}; };
extraOptions = [
"--network=proxiable"
];
}; };
};
systemd.tmpfiles.settings."uptime-kuma" = { systemd.tmpfiles.settings."uptime-kuma" = {
"/var/lib/uptime-kuma".d = { "/var/lib/uptime-kuma".d = {
mode = "0755"; mode = "0755";
};
}; };
};
environment.systemPackages = with pkgs; [ docker-compose ]; environment.systemPackages = with pkgs; [ docker-compose ];
};
} }