openspeedtest: Remove module

This commit is contained in:
SebastianStork 2025-11-26 14:22:16 +01:00
parent 0c5d4436ad
commit c2449eb557
Signed by: SebastianStork
SSH key fingerprint: SHA256:iEM011ogNMG1q8+U500adGu/9rpPuZ2KnFtbdLeqTiI

View file

@ -1,32 +0,0 @@
{ config, lib, ... }:
let
cfg = config.custom.services.openspeedtest;
in
{
options.custom.services.openspeedtest = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 4479;
};
};
config = lib.mkIf cfg.enable {
meta = {
domains.local = [ cfg.domain ];
ports.tcp = [ cfg.port ];
};
virtualisation.oci-containers.containers.openspeedtest = {
image = "openspeedtest/latest";
ports = [ "127.0.0.1:${toString cfg.port}:3000" ];
pull = "newer";
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}