diff --git a/hosts/hopper/default.nix b/hosts/hopper/default.nix index c1c295f..1d4a01f 100644 --- a/hosts/hopper/default.nix +++ b/hosts/hopper/default.nix @@ -45,8 +45,6 @@ nix.nix nix.gc - services.flatpak - network.tailscale network.avahi network.networkd @@ -57,6 +55,9 @@ builtins.elem (lib.getName pkg) [ "nvidia-x11" "nvidia-settings" + + "stremio-shell" + "stremio-server" ]; }; diff --git a/hosts/hopper/home.nix b/hosts/hopper/home.nix index e9e4539..2657e9f 100644 --- a/hosts/hopper/home.nix +++ b/hosts/hopper/home.nix @@ -29,6 +29,7 @@ pwvucontrol qpwgraph + stremio moonlight-qt ]; diff --git a/hosts/hopper/profiles/lab/caddy.nix b/hosts/hopper/profiles/lab/caddy.nix index f58fc12..979412f 100644 --- a/hosts/hopper/profiles/lab/caddy.nix +++ b/hosts/hopper/profiles/lab/caddy.nix @@ -21,9 +21,7 @@ in { services.caddy = { enable = true; globalConfig = '' - metrics { - per_host - } + metrics servers { trusted_proxies static 10.0.0.1 } diff --git a/hosts/hopper/profiles/lab/prometheus.nix b/hosts/hopper/profiles/lab/prometheus.nix index fdff915..4d9a650 100644 --- a/hosts/hopper/profiles/lab/prometheus.nix +++ b/hosts/hopper/profiles/lab/prometheus.nix @@ -10,16 +10,9 @@ scrapeConfigs = [ { job_name = "node"; - static_configs = [ - { - targets = ["127.0.0.1:9100"]; - labels.alias = "hopper"; - } - { - targets = ["rackserv:9100"]; - labels.alias = "rackserv"; - } - ]; + static_configs = lib.singleton { + targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; + }; } { job_name = "tailscale_client"; @@ -29,16 +22,9 @@ } { job_name = "caddy"; - static_configs = [ - { - targets = ["${config.vpnNamespaces."wg".namespaceAddress}:2019"]; - labels.alias = "hopper"; - } - { - targets = ["rackserv:2019"]; - labels.alias = "rackserv"; - } - ]; + static_configs = lib.singleton { + targets = ["${config.vpnNamespaces."wg".namespaceAddress}:2019"]; + }; } { job_name = "slskd"; @@ -51,12 +37,6 @@ action = "drop"; }; } - { - job_name = "forgejo"; - static_configs = lib.singleton { - targets = ["rackserv:9615"]; - }; - } ]; }; diff --git a/hosts/nixdesk/default.nix b/hosts/nixdesk/default.nix index 9cb67d9..c3e0f4f 100644 --- a/hosts/nixdesk/default.nix +++ b/hosts/nixdesk/default.nix @@ -118,6 +118,9 @@ "idea-ultimate" "android-studio-stable" "krunker" + + "stremio-shell" + "stremio-server" ]; android_sdk.accept_license = true; }; diff --git a/hosts/nixdesk/home.nix b/hosts/nixdesk/home.nix index 9342a95..cee21fd 100644 --- a/hosts/nixdesk/home.nix +++ b/hosts/nixdesk/home.nix @@ -144,6 +144,7 @@ picard # media + stremio feishin foliate diff --git a/hosts/rackserv/default.nix b/hosts/rackserv/default.nix index a5959a4..4090f52 100644 --- a/hosts/rackserv/default.nix +++ b/hosts/rackserv/default.nix @@ -14,7 +14,6 @@ ./profiles/backups.nix ./profiles/caddy.nix ./profiles/forgejo.nix - ./profiles/prometheus.nix ] ++ (with systemProfiles; [ core.security diff --git a/hosts/rackserv/profiles/caddy.nix b/hosts/rackserv/profiles/caddy.nix index 561ef96..2074587 100644 --- a/hosts/rackserv/profiles/caddy.nix +++ b/hosts/rackserv/profiles/caddy.nix @@ -22,20 +22,9 @@ in { }; }; - # systemd.services.caddy.environment.CADDY_ADMIN = "${vars.tailnet.rackserv}:2019"; services.caddy = { enable = true; - globalConfig = '' - metrics { - per_host - } - admin :2019 { - origins 127.0.0.1 100.64.0.0/10 - } - ''; - virtualHosts = let - forgejoPort = toString config.services.forgejo.settings.server.HTTP_PORT; - in { + virtualHosts = { misc = { hostName = "${domain}"; serverAliases = ["*.${domain}"]; @@ -48,21 +37,12 @@ in { hostName = "git.${domain}"; useACMEHost = domain; extraConfig = '' - respond /metrics 403 - reverse_proxy localhost:${forgejoPort} + reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT} ''; }; - forgejoMetrics = { - hostName = ":9615"; + other = { extraConfig = '' - @blocked { - not { - client_ip ${vars.tailnet.hopper} - path /metrics - } - } - respond @blocked 403 - reverse_proxy localhost:${forgejoPort} + respond 404 ''; }; }; diff --git a/hosts/rackserv/profiles/forgejo.nix b/hosts/rackserv/profiles/forgejo.nix index ef2cbb8..c0a24fa 100644 --- a/hosts/rackserv/profiles/forgejo.nix +++ b/hosts/rackserv/profiles/forgejo.nix @@ -11,11 +11,6 @@ HTTP_PORT = 3000; HTTP_ADDR = "127.0.0.1"; }; - metrics = { - ENABLED = true; - ENABLED_ISSUE_BY_LABEL = true; - ENABLED_ISSUE_BY_REPOSITORY = true; - }; service.DISABLE_REGISTRATION = true; }; }; diff --git a/hosts/rackserv/profiles/prometheus.nix b/hosts/rackserv/profiles/prometheus.nix deleted file mode 100644 index 1bd185c..0000000 --- a/hosts/rackserv/profiles/prometheus.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - services.prometheus.exporters = { - node = { - enable = true; - enabledCollectors = ["systemd"]; - }; - }; -}