various updates
This commit is contained in:
parent
56b6195620
commit
d1cdaf176d
5 changed files with 39 additions and 63 deletions
|
@ -35,6 +35,7 @@
|
|||
"https://hyprland.cachix.org"
|
||||
"https://0x76-infra.cachix.org"
|
||||
"https://webcord.cachix.org"
|
||||
"https://cache.garnix.io"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
|
||||
|
@ -44,6 +45,7 @@
|
|||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"0x76-infra.cachix.org-1:dC1qp+VEN3jj5pdK4URlXR9hf3atT+MnpKGu6PZjMc8="
|
||||
"webcord.cachix.org-1:l555jqOZGHd2C9+vS8ccdh8FhqnGe8L78QrHNn+EFEs="
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
];
|
||||
};
|
||||
optimise = {
|
||||
|
|
|
@ -3,8 +3,7 @@ with lib;
|
|||
let
|
||||
cfg = config.services.vmagent;
|
||||
settingsFormat = pkgs.formats.json { };
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.vmagent = {
|
||||
enable = mkEnableOption "vmagent";
|
||||
|
||||
|
@ -50,9 +49,7 @@ in
|
|||
};
|
||||
|
||||
prometheusConfig = mkOption {
|
||||
type = lib.types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
};
|
||||
type = lib.types.submodule { freeformType = settingsFormat.type; };
|
||||
description = ''
|
||||
Config for prometheus style metrics
|
||||
'';
|
||||
|
@ -76,7 +73,7 @@ in
|
|||
vmagent = {
|
||||
group = cfg.group;
|
||||
shell = pkgs.bashInteractive;
|
||||
description = "vmagent Daemon user";
|
||||
description = "vmagent daemon user";
|
||||
home = cfg.dataDir;
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
@ -86,23 +83,25 @@ in
|
|||
networking.firewall.allowedTCPPorts = mkIf (cfg.openFirewall) [ 8429 ];
|
||||
|
||||
# The actual service
|
||||
systemd.services.vmagent =
|
||||
let prometheusConfig = settingsFormat.generate "prometheusConfig.yaml" cfg.prometheusConfig;
|
||||
in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
description = "vmagent system service";
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/vmagent -remoteWrite.url=${cfg.remoteWriteUrl} -promscrape.config=${prometheusConfig}";
|
||||
};
|
||||
systemd.services.vmagent = let
|
||||
prometheusConfig =
|
||||
settingsFormat.generate "prometheusConfig.yaml" cfg.prometheusConfig;
|
||||
in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
description = "vmagent system service";
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/vmagent -remoteWrite.url=${cfg.remoteWriteUrl} -promscrape.config=${prometheusConfig}";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ];
|
||||
systemd.tmpfiles.rules =
|
||||
[ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenvNoCC, lib, fetchFromGitHub, xorg, inkscape }:
|
||||
{ stdenvNoCC, lib, fetchFromGitHub, xcursorgen, inkscape, makeFontsConf }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "catppuccin-cursors";
|
||||
|
@ -11,13 +11,16 @@ stdenvNoCC.mkDerivation {
|
|||
sha256 = "sha256-0wb84q1VtD1myIRxrfQMn9n6w1gFzMA1rHkPqXuXLP0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
xorg.xcursorgen
|
||||
inkscape
|
||||
];
|
||||
nativeBuildInputs = [ xcursorgen inkscape ];
|
||||
|
||||
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
|
||||
|
||||
buildPhase = ''
|
||||
HOME="$NIX_BUILD_ROOT" PREFIX="/" DESTDIR=$out make build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
PREFIX="/" DESTDIR=$out make install
|
||||
HOME="$NIX_BUILD_ROOT" PREFIX="/" DESTDIR=$out make install
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -25,5 +28,6 @@ stdenvNoCC.mkDerivation {
|
|||
homepage = "https://github.com/catppuccin/cursors";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ nullx76 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,23 +1,26 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
buildGoModule rec {
|
||||
pname = "vmagent";
|
||||
version = "1.59.0";
|
||||
version = "1.82.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VictoriaMetrics";
|
||||
repo = "VictoriaMetrics";
|
||||
rev = "v${version}";
|
||||
sha256 = "1mfdhv20m2xqsg37pdv4vbxdg8iri79grc4g4p9ph0js9yd6nbys";
|
||||
sha256 = "JIl2WeveDoAHzqJ2cqMxpWeNf4yQC9fIdfECOJywJ2A=";
|
||||
};
|
||||
|
||||
ldflags = [ "-s" "-w" "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}" ];
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
subPackages = [ "app/vmagent" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "VictoriaMetrics metrics scraper";
|
||||
homepage = "https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmagent";
|
||||
description = "VictoriaMetrics metrics scraper";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ nullx76 ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue