nix machine / user configurations

feat(wolumonde): add perses instead, victoriametrics boilerplate

ptr.pet 68eaeb55 4ae6812c

verified
Changed files
+55 -1
hosts
+1 -1
hosts/wolumonde/default.nix
···
allowedUDPPortRanges = [ ];
};
-
virtualisation.docker.enable = true;
+
virtualisation.docker.enable = false;
system.stateVersion = "22.05";
}
hosts/wolumonde/modules/grafana.nix hosts/wolumonde/modules/grafana.disabled
+48
hosts/wolumonde/modules/perses.nix
···
+
{config, ...}:
+
let
+
domain = "dash.gaze.systems";
+
port = 7412;
+
in
+
{
+
virtualisation.oci-containers.containers.pds = {
+
image = "persesdev/perses";
+
autoStart = true;
+
environment = {
+
PERSES_DATABASE_FILE_FOLDER = "/perses/db";
+
};
+
ports = [ "${port}:8080" ];
+
volumes = [
+
"/var/lib/perses:/perses"
+
];
+
extraOptions = [
+
# "--network=host"
+
"--label=io.containers.autoupdate=registry"
+
];
+
};
+
+
services.nginx.virtualHosts.${domain} = {
+
useACMEHost = "gaze.systems"; # TODO: write a module to define vhosts for subdomains
+
quic = true;
+
kTLS = true;
+
forceSSL = true;
+
locations."/" = {
+
proxyPass = "http://localhost:${port}";
+
};
+
};
+
+
# podmanning
+
virtualisation.podman = {
+
enable = true;
+
dockerCompat = true;
+
defaultNetwork.settings.dns_enabled = true;
+
};
+
# update containers automatically
+
systemd.timers."podman-auto-update" = {
+
enable = true;
+
timerConfig = {
+
OnCalendar = "*-*-* 4:00:00";
+
Persistent = true;
+
};
+
wantedBy = [ "timers.target" ];
+
};
+
}
+6
hosts/wolumonde/modules/victoria.nix
···
+
{
+
service.victoriametrics = {
+
enable = true;
+
listenAddress = ":9090";
+
};
+
}