remove vmagent (has now been upstreamed)
This commit is contained in:
parent
2f348356bc
commit
272285ceea
6 changed files with 31 additions and 165 deletions
54
flake.lock
54
flake.lock
|
@ -51,11 +51,11 @@
|
||||||
"stable": "stable"
|
"stable": "stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665350797,
|
"lastModified": 1666221385,
|
||||||
"narHash": "sha256-7XAcfqRlsJf+y7174WcKJzHoZlq5ChrrymShL0xj8QY=",
|
"narHash": "sha256-HZW4iiNqlPhp1tCAzG07svfsVg8rH3wvVKr2fRTKOTA=",
|
||||||
"owner": "zhaofengli",
|
"owner": "zhaofengli",
|
||||||
"repo": "colmena",
|
"repo": "colmena",
|
||||||
"rev": "872949504befb9b5540e69f846c6965def7150f9",
|
"rev": "956c3363b875695fba30a5a8033dc543c2cd4326",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -74,11 +74,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663284638,
|
"lastModified": 1666010793,
|
||||||
"narHash": "sha256-rXAX14yB8v9BOG4ZsdGEedpZAnNqhQ4DtjQwzFX/TLY=",
|
"narHash": "sha256-6zhTpR0cfaHrupOXRZAdCzLAGINgsB6h3HQnj7+qHWs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "comma",
|
"repo": "comma",
|
||||||
"rev": "c83ff3839983b3cb8deb407ff618ca12179de588",
|
"rev": "691120d169189f3a9cb29b1c72bcd521ac372b2b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -420,11 +420,11 @@
|
||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665991686,
|
"lastModified": 1666253070,
|
||||||
"narHash": "sha256-VbhugQ+NhybgCfU1gpbEQ6QFYrVQ3jRioYIYFVZ+KPs=",
|
"narHash": "sha256-MtaNgghmfp+ywh5mv9FcspFT4ACaYINSN+D98PCkrP0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e901c8d86082be74a8be70773bbb6d401ff21e49",
|
"rev": "c485669ca529e01c1505429fa9017c9a93f15559",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -439,11 +439,11 @@
|
||||||
"wlroots": "wlroots"
|
"wlroots": "wlroots"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665955562,
|
"lastModified": 1666213922,
|
||||||
"narHash": "sha256-h28jGbOaZCUCPWEtzyWuPpR6XXEmOYB3rjjj0DXhwgo=",
|
"narHash": "sha256-GFy1zY7Cd5361v5/eJAsXIxnUyCrRUDgTg6zxbq/7Ws=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "58375bc87a189c915d12ad93d202462427e239ac",
|
"rev": "1b349f79acd29bf7589472147ec3853b6cad71b7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -550,11 +550,11 @@
|
||||||
"utils": "utils_4"
|
"utils": "utils_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665972530,
|
"lastModified": 1666230919,
|
||||||
"narHash": "sha256-0pDAiY9m+PMBhAVE2JIK2uFClCpiYOz760peby/Okd4=",
|
"narHash": "sha256-gVbo0uLZIGW2RPtVY02ZRPlXRAYHtWl4WWZmmDzdurs=",
|
||||||
"owner": "jyooru",
|
"owner": "jyooru",
|
||||||
"repo": "nix-minecraft-servers",
|
"repo": "nix-minecraft-servers",
|
||||||
"rev": "ebeb9cd865e5844ee03304de331a5da3c278bf9a",
|
"rev": "36451bfa96b82304a34f44c190aa26aaa7cec7fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -691,11 +691,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660727616,
|
"lastModified": 1666016402,
|
||||||
"narHash": "sha256-zYTIvdPMYMx/EYqXODAwIIU30RiEHqNHdgarIHuEYZc=",
|
"narHash": "sha256-Cm/nrdUMXwXiFQforG1Mv8OA4o8yhuVx6E1eDFH4rew=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "adccd191a0e83039d537e021f19495b7bad546a1",
|
"rev": "688db42a1eb34853f050267ff65c975f664312f0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -737,11 +737,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666000441,
|
"lastModified": 1666255399,
|
||||||
"narHash": "sha256-yetw+pK0soEDDn/KejAOs9xp8U/XFmnq/hPZRA55PDY=",
|
"narHash": "sha256-0fEBKhkjf/9/Pi/lBVP/z4G1auYnGt9xC2lNo2FZiwM=",
|
||||||
"owner": "NULLx76",
|
"owner": "NULLx76",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "136d760d8dce4641bb4e9c4ceffa2c25de725ac9",
|
"rev": "ed2d6191f0362fc68e3465355d524b3ba96626c8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -941,11 +941,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665542977,
|
"lastModified": 1666151986,
|
||||||
"narHash": "sha256-z5DLRdG0J6ZLx/FdnX6PCwCVyXUfu3gUzJSfu3Bh3ak=",
|
"narHash": "sha256-mW9UpFa6TmYgt0VuOwxRZkesrXkl7Z+RW5M/T7PyCBc=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "serokell.nix",
|
"repo": "serokell.nix",
|
||||||
"rev": "c61261e6ed552bb1679226c0f8ff8504268492b0",
|
"rev": "7441de5b6518d20a47d962837e119f74bbe7a93f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1078,11 +1078,11 @@
|
||||||
"webcord": "webcord_2"
|
"webcord": "webcord_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665619753,
|
"lastModified": 1666097086,
|
||||||
"narHash": "sha256-FmwkmuXTE3gaQaDwD6abKgIED6qKOSVNo1SAeFE/rvY=",
|
"narHash": "sha256-6WKh4NwItcz9IGY5rGkkeWCtGOmpU3nf85dX29suDjE=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "webcord-flake",
|
"repo": "webcord-flake",
|
||||||
"rev": "f94b5553fb8dcda6cfdd1ab569212c3324aa3885",
|
"rev": "9098504f2a08ac848ea43de40496925c450e7111",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
./dns.nix
|
./dns.nix
|
||||||
./flood.nix
|
./flood.nix
|
||||||
./unpackerr.nix
|
./unpackerr.nix
|
||||||
./vmagent.nix
|
|
||||||
./vault.nix
|
./vault.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.services.vmagent;
|
|
||||||
settingsFormat = pkgs.formats.json { };
|
|
||||||
in {
|
|
||||||
options.services.vmagent = {
|
|
||||||
enable = mkEnableOption "vmagent";
|
|
||||||
|
|
||||||
user = mkOption {
|
|
||||||
default = "vmagent";
|
|
||||||
type = types.str;
|
|
||||||
description = ''
|
|
||||||
User account under which vmagent runs.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
group = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "vmagent";
|
|
||||||
description = ''
|
|
||||||
Group under which vmagent runs.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
default = pkgs.vmagent;
|
|
||||||
defaultText = "pkgs.vmagent";
|
|
||||||
type = types.package;
|
|
||||||
description = ''
|
|
||||||
vmagent package to use.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
dataDir = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "/var/lib/vmagent";
|
|
||||||
description = ''
|
|
||||||
The directory where vmagent stores its data files.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
remoteWriteUrl = mkOption {
|
|
||||||
default = "http://localhost:8428/api/v1/write";
|
|
||||||
type = types.str;
|
|
||||||
description = ''
|
|
||||||
The remote storage endpoint such as VictoriaMetrics
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
prometheusConfig = mkOption {
|
|
||||||
type = lib.types.submodule { freeformType = settingsFormat.type; };
|
|
||||||
description = ''
|
|
||||||
Config for prometheus style metrics
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
openFirewall = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether to open the firewall for the default ports.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
# Create group if set to default
|
|
||||||
users.groups = mkIf (cfg.group == "vmagent") { vmagent = { }; };
|
|
||||||
|
|
||||||
# Create user if set to default
|
|
||||||
users.users = mkIf (cfg.user == "vmagent") {
|
|
||||||
vmagent = {
|
|
||||||
group = cfg.group;
|
|
||||||
shell = pkgs.bashInteractive;
|
|
||||||
description = "vmagent daemon user";
|
|
||||||
home = cfg.dataDir;
|
|
||||||
isSystemUser = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Open firewall if option is set to do so.
|
|
||||||
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.tmpfiles.rules =
|
|
||||||
[ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -31,6 +31,7 @@
|
||||||
windowrulev2 = workspace 1 silent,class:^(Electron)$,title:^(.*)(WebCord)(.*)$
|
windowrulev2 = workspace 1 silent,class:^(Electron)$,title:^(.*)(WebCord)(.*)$
|
||||||
windowrulev2 = workspace 1 silent,title:^(Element)(.*)$
|
windowrulev2 = workspace 1 silent,title:^(Element)(.*)$
|
||||||
windowrulev2 = workspace 2 silent,class:^(firefox-aurora)$
|
windowrulev2 = workspace 2 silent,class:^(firefox-aurora)$
|
||||||
|
windowrulev2 = float,class:^(firefox-aurora)$,title:^(Picture-in-Picture)$
|
||||||
|
|
||||||
general {
|
general {
|
||||||
layout = dwindle
|
layout = dwindle
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
bind=SUPER,W,killactive,
|
bind=SUPER,W,killactive,
|
||||||
bind=SUPERSHIFT,Q,exit,
|
bind=SUPERSHIFT,Q,exit,
|
||||||
bind=SUPER,S,togglefloating,
|
bind=SUPER,S,togglefloating,
|
||||||
bind=SUPER,P,pseudo,
|
bind=SUPER,P,pin,
|
||||||
|
|
||||||
bindm=SUPER,mouse:272,movewindow
|
bindm=SUPER,mouse:272,movewindow
|
||||||
bindm=SUPER,mouse:273,resizewindow
|
bindm=SUPER,mouse:273,resizewindow
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
catppuccin.cursors = prev.callPackage ./catppuccin/cursors { };
|
catppuccin.cursors = prev.callPackage ./catppuccin/cursors { };
|
||||||
|
|
||||||
vmagent = prev.callPackage ./vmagent { };
|
|
||||||
|
|
||||||
v = {
|
v = {
|
||||||
glitch-soc = prev.callPackage ./glitch-soc { };
|
glitch-soc = prev.callPackage ./glitch-soc { };
|
||||||
|
|
||||||
|
@ -21,7 +19,8 @@ final: prev: {
|
||||||
gitea-agatheme = prev.callPackage ./gitea-agatheme { };
|
gitea-agatheme = prev.callPackage ./gitea-agatheme { };
|
||||||
|
|
||||||
vscode-extensions = {
|
vscode-extensions = {
|
||||||
platformio.platformio-ide = prev.callPackage ./vscode-extensions/platformio.nix { };
|
platformio.platformio-ide =
|
||||||
|
prev.callPackage ./vscode-extensions/platformio.nix { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
{ lib, fetchFromGitHub, buildGoModule }:
|
|
||||||
buildGoModule rec {
|
|
||||||
pname = "vmagent";
|
|
||||||
version = "1.82.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "VictoriaMetrics";
|
|
||||||
repo = "VictoriaMetrics";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "JIl2WeveDoAHzqJ2cqMxpWeNf4yQC9fIdfECOJywJ2A=";
|
|
||||||
};
|
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}" ];
|
|
||||||
|
|
||||||
vendorSha256 = null;
|
|
||||||
|
|
||||||
subPackages = [ "app/vmagent" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
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…
Reference in a new issue