mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
openspeedtest: Remove module
This commit is contained in:
parent
0c5d4436ad
commit
c2449eb557
1 changed files with 0 additions and 32 deletions
|
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue