various updates

This commit is contained in:
Vivian 2022-10-09 11:58:31 +02:00
parent 56b6195620
commit d1cdaf176d
5 changed files with 39 additions and 63 deletions

View file

@ -27,38 +27,6 @@ jobs:
name: nixos-iso name: nixos-iso
retention-days: 3 retention-days: 3
path: result/iso/*.iso path: result/iso/*.iso
build-null:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.2
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v15
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v10
with:
name: 0x76-infra
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: "Build NixOS config ❄️"
run: |
nix run '.#' build -- --on "null"
build-olympus: build-olympus:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View file

@ -35,6 +35,7 @@
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://0x76-infra.cachix.org" "https://0x76-infra.cachix.org"
"https://webcord.cachix.org" "https://webcord.cachix.org"
"https://cache.garnix.io"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=" "cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
@ -44,6 +45,7 @@
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"0x76-infra.cachix.org-1:dC1qp+VEN3jj5pdK4URlXR9hf3atT+MnpKGu6PZjMc8=" "0x76-infra.cachix.org-1:dC1qp+VEN3jj5pdK4URlXR9hf3atT+MnpKGu6PZjMc8="
"webcord.cachix.org-1:l555jqOZGHd2C9+vS8ccdh8FhqnGe8L78QrHNn+EFEs=" "webcord.cachix.org-1:l555jqOZGHd2C9+vS8ccdh8FhqnGe8L78QrHNn+EFEs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
]; ];
}; };
optimise = { optimise = {

View file

@ -3,8 +3,7 @@ with lib;
let let
cfg = config.services.vmagent; cfg = config.services.vmagent;
settingsFormat = pkgs.formats.json { }; settingsFormat = pkgs.formats.json { };
in in {
{
options.services.vmagent = { options.services.vmagent = {
enable = mkEnableOption "vmagent"; enable = mkEnableOption "vmagent";
@ -50,9 +49,7 @@ in
}; };
prometheusConfig = mkOption { prometheusConfig = mkOption {
type = lib.types.submodule { type = lib.types.submodule { freeformType = settingsFormat.type; };
freeformType = settingsFormat.type;
};
description = '' description = ''
Config for prometheus style metrics Config for prometheus style metrics
''; '';
@ -76,7 +73,7 @@ in
vmagent = { vmagent = {
group = cfg.group; group = cfg.group;
shell = pkgs.bashInteractive; shell = pkgs.bashInteractive;
description = "vmagent Daemon user"; description = "vmagent daemon user";
home = cfg.dataDir; home = cfg.dataDir;
isSystemUser = true; isSystemUser = true;
}; };
@ -86,8 +83,9 @@ in
networking.firewall.allowedTCPPorts = mkIf (cfg.openFirewall) [ 8429 ]; networking.firewall.allowedTCPPorts = mkIf (cfg.openFirewall) [ 8429 ];
# The actual service # The actual service
systemd.services.vmagent = systemd.services.vmagent = let
let prometheusConfig = settingsFormat.generate "prometheusConfig.yaml" cfg.prometheusConfig; prometheusConfig =
settingsFormat.generate "prometheusConfig.yaml" cfg.prometheusConfig;
in { in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
@ -103,6 +101,7 @@ in
}; };
}; };
systemd.tmpfiles.rules = [ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ]; systemd.tmpfiles.rules =
[ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ];
}; };
} }

View file

@ -1,4 +1,4 @@
{ stdenvNoCC, lib, fetchFromGitHub, xorg, inkscape }: { stdenvNoCC, lib, fetchFromGitHub, xcursorgen, inkscape, makeFontsConf }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "catppuccin-cursors"; pname = "catppuccin-cursors";
@ -11,13 +11,16 @@ stdenvNoCC.mkDerivation {
sha256 = "sha256-0wb84q1VtD1myIRxrfQMn9n6w1gFzMA1rHkPqXuXLP0="; sha256 = "sha256-0wb84q1VtD1myIRxrfQMn9n6w1gFzMA1rHkPqXuXLP0=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ xcursorgen inkscape ];
xorg.xcursorgen
inkscape FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
];
buildPhase = ''
HOME="$NIX_BUILD_ROOT" PREFIX="/" DESTDIR=$out make build
'';
installPhase = '' installPhase = ''
PREFIX="/" DESTDIR=$out make install HOME="$NIX_BUILD_ROOT" PREFIX="/" DESTDIR=$out make install
''; '';
meta = with lib; { meta = with lib; {
@ -25,5 +28,6 @@ stdenvNoCC.mkDerivation {
homepage = "https://github.com/catppuccin/cursors"; homepage = "https://github.com/catppuccin/cursors";
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ nullx76 ];
}; };
} }

View file

@ -1,23 +1,26 @@
{ lib, fetchFromGitHub, buildGoModule }: { lib, fetchFromGitHub, buildGoModule }:
buildGoModule rec { buildGoModule rec {
pname = "vmagent"; pname = "vmagent";
version = "1.59.0"; version = "1.82.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "VictoriaMetrics"; owner = "VictoriaMetrics";
repo = "VictoriaMetrics"; repo = "VictoriaMetrics";
rev = "v${version}"; rev = "v${version}";
sha256 = "1mfdhv20m2xqsg37pdv4vbxdg8iri79grc4g4p9ph0js9yd6nbys"; sha256 = "JIl2WeveDoAHzqJ2cqMxpWeNf4yQC9fIdfECOJywJ2A=";
}; };
ldflags = [ "-s" "-w" "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}" ];
vendorSha256 = null; vendorSha256 = null;
subPackages = [ "app/vmagent" ]; subPackages = [ "app/vmagent" ];
meta = with lib; { meta = with lib; {
description = "VictoriaMetrics metrics scraper";
homepage = "https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmagent"; homepage = "https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmagent";
description = "VictoriaMetrics metrics scraper";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ nullx76 ];
}; };
} }