Compare commits

..

No commits in common. "71153b4e28da5e524450dc9d8f44989953a71d34" and "1e5b58bb318a4dd51036c2e16f96d5f7c898cce0" have entirely different histories.

10 changed files with 19 additions and 69 deletions

View file

@ -45,8 +45,6 @@
nix.nix nix.nix
nix.gc nix.gc
services.flatpak
network.tailscale network.tailscale
network.avahi network.avahi
network.networkd network.networkd
@ -57,6 +55,9 @@
builtins.elem (lib.getName pkg) [ builtins.elem (lib.getName pkg) [
"nvidia-x11" "nvidia-x11"
"nvidia-settings" "nvidia-settings"
"stremio-shell"
"stremio-server"
]; ];
}; };

View file

@ -29,6 +29,7 @@
pwvucontrol pwvucontrol
qpwgraph qpwgraph
stremio
moonlight-qt moonlight-qt
]; ];

View file

@ -21,9 +21,7 @@ in {
services.caddy = { services.caddy = {
enable = true; enable = true;
globalConfig = '' globalConfig = ''
metrics { metrics
per_host
}
servers { servers {
trusted_proxies static 10.0.0.1 trusted_proxies static 10.0.0.1
} }

View file

@ -10,16 +10,9 @@
scrapeConfigs = [ scrapeConfigs = [
{ {
job_name = "node"; job_name = "node";
static_configs = [ static_configs = lib.singleton {
{ targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
targets = ["127.0.0.1:9100"]; };
labels.alias = "hopper";
}
{
targets = ["rackserv:9100"];
labels.alias = "rackserv";
}
];
} }
{ {
job_name = "tailscale_client"; job_name = "tailscale_client";
@ -29,16 +22,9 @@
} }
{ {
job_name = "caddy"; job_name = "caddy";
static_configs = [ static_configs = lib.singleton {
{ targets = ["${config.vpnNamespaces."wg".namespaceAddress}:2019"];
targets = ["${config.vpnNamespaces."wg".namespaceAddress}:2019"]; };
labels.alias = "hopper";
}
{
targets = ["rackserv:2019"];
labels.alias = "rackserv";
}
];
} }
{ {
job_name = "slskd"; job_name = "slskd";
@ -51,12 +37,6 @@
action = "drop"; action = "drop";
}; };
} }
{
job_name = "forgejo";
static_configs = lib.singleton {
targets = ["rackserv:9615"];
};
}
]; ];
}; };

View file

@ -118,6 +118,9 @@
"idea-ultimate" "idea-ultimate"
"android-studio-stable" "android-studio-stable"
"krunker" "krunker"
"stremio-shell"
"stremio-server"
]; ];
android_sdk.accept_license = true; android_sdk.accept_license = true;
}; };

View file

@ -144,6 +144,7 @@
picard picard
# media # media
stremio
feishin feishin
foliate foliate

View file

@ -14,7 +14,6 @@
./profiles/backups.nix ./profiles/backups.nix
./profiles/caddy.nix ./profiles/caddy.nix
./profiles/forgejo.nix ./profiles/forgejo.nix
./profiles/prometheus.nix
] ]
++ (with systemProfiles; [ ++ (with systemProfiles; [
core.security core.security

View file

@ -22,20 +22,9 @@ in {
}; };
}; };
# systemd.services.caddy.environment.CADDY_ADMIN = "${vars.tailnet.rackserv}:2019";
services.caddy = { services.caddy = {
enable = true; enable = true;
globalConfig = '' virtualHosts = {
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 {
misc = { misc = {
hostName = "${domain}"; hostName = "${domain}";
serverAliases = ["*.${domain}"]; serverAliases = ["*.${domain}"];
@ -48,21 +37,12 @@ in {
hostName = "git.${domain}"; hostName = "git.${domain}";
useACMEHost = domain; useACMEHost = domain;
extraConfig = '' extraConfig = ''
respond /metrics 403 reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}
reverse_proxy localhost:${forgejoPort}
''; '';
}; };
forgejoMetrics = { other = {
hostName = ":9615";
extraConfig = '' extraConfig = ''
@blocked { respond 404
not {
client_ip ${vars.tailnet.hopper}
path /metrics
}
}
respond @blocked 403
reverse_proxy localhost:${forgejoPort}
''; '';
}; };
}; };

View file

@ -11,11 +11,6 @@
HTTP_PORT = 3000; HTTP_PORT = 3000;
HTTP_ADDR = "127.0.0.1"; HTTP_ADDR = "127.0.0.1";
}; };
metrics = {
ENABLED = true;
ENABLED_ISSUE_BY_LABEL = true;
ENABLED_ISSUE_BY_REPOSITORY = true;
};
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
}; };
}; };

View file

@ -1,8 +0,0 @@
{
services.prometheus.exporters = {
node = {
enable = true;
enabledCollectors = ["systemd"];
};
};
}