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