also refactor nixos modules
This commit is contained in:
parent
2471562583
commit
b37c5c0cbd
44 changed files with 10 additions and 2 deletions
28
modules/nixos/services/observability/uptime-kuma.nix
Normal file
28
modules/nixos/services/observability/uptime-kuma.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.sneeuwvlok.services.observability.uptime-kuma;
|
||||
in {
|
||||
options.sneeuwvlok.services.observability.uptime-kuma = {
|
||||
enable = mkEnableOption "enable uptime kuma";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.uptime-kuma = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PORT = toString 9006;
|
||||
HOST = "0.0.0.0";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [9006];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue