diff --git a/systems/x86_64-linux/marvin/services/git.nix b/systems/x86_64-linux/marvin/services/git.nix index 73395f2e..a0e143b3 100644 --- a/systems/x86_64-linux/marvin/services/git.nix +++ b/systems/x86_64-linux/marvin/services/git.nix @@ -117,7 +117,7 @@ in }; }; }; - age.secrets = { + age.secrets = lib.mkIf config.services.forgejo.enable { forgejo-db-pw = forgejoSecret // { file = ./secrets/forgejo/db-pw.age; }; @@ -146,11 +146,19 @@ in file = ./secrets/forgejo/secret-key.age; }; }; - services.anubis.instances.forgejo = { + services.anubis.instances.forgejo = lib.mkIf config.services.forgejo.enable { settings = { BIND = ":${toString d.anubis}"; POLICY_FNAME = "${pkgs.py.anubis-files}/policies/forgejo.yaml"; TARGET = "http://localhost:${toString d.port}"; }; }; + services.prometheus.scrapeConfigs = lib.mkIf config.services.forgejo.enable [ + { + job_name = "forgejo"; + static_configs = [ + { targets = [ "127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}" ]; } + ]; + } + ]; } diff --git a/systems/x86_64-linux/marvin/services/jellyfin.nix b/systems/x86_64-linux/marvin/services/jellyfin.nix index a42a18e9..dfab81c9 100644 --- a/systems/x86_64-linux/marvin/services/jellyfin.nix +++ b/systems/x86_64-linux/marvin/services/jellyfin.nix @@ -11,4 +11,10 @@ 1900 7359 ]; + services.prometheus.scrapeConfigs = [ + { + job_name = "jellyfin_server"; + static_configs = [ { targets = [ "127.0.0.1:8096" ]; } ]; + } + ]; } diff --git a/systems/x86_64-linux/marvin/services/prometheus.nix b/systems/x86_64-linux/marvin/services/prometheus.nix index 098828df..9c593749 100644 --- a/systems/x86_64-linux/marvin/services/prometheus.nix +++ b/systems/x86_64-linux/marvin/services/prometheus.nix @@ -17,20 +17,6 @@ { targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; } ]; } - { - job_name = "gitea"; - static_configs = [ - { targets = [ "127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}" ]; } - ]; - } - { - job_name = "jellyfin"; - static_configs = [ { targets = [ "127.0.0.1:8096" ]; } ]; - } - { - job_name = "authentik"; - static_configs = [ { targets = [ "127.0.0.1:9301" ]; } ]; - } { job_name = "prometheus"; static_configs = [ { targets = [ "127.0.0.1:6999" ]; } ];