1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

nixos/lib/pkgs: add zedhook unstable

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher 2022-04-19 13:02:20 -04:00
parent aa7ec1258a
commit 33a34b3680
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
2 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,27 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "zedhook";
version = "unstable-2022-04-18";
src = fetchFromGitHub {
owner = "mdlayher";
repo = "zedhook";
rev = "e30e67abaa5e5b53f11fb613946325fe06f8ca97";
sha256 = "sha256-+GWMC/EaKiSQQpxu8mudtRdLrWczWR6ZaVhn/VCAa5M=";
};
modBuildPhase = ''
go mod edit -go=1.18
go mod tidy
'';
vendorSha256 = "sha256-AI08Y/QQR62SZSgSguPrtzxmSmCZvhHnj0+phZuLi3E=";
meta = with lib; {
homepage = "github.com/mdlayher/zedhook";
description = "zedhook ZFS event monitoring system.";
license = licenses.asl20;
maintainers = with maintainers; [ mdlayher ];
};
}

View file

@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
let vars = import ./lib/vars.nix;
let
unstable = import <nixos-unstable-small> { };
vars = import ./lib/vars.nix;
in {
imports = [
@ -45,6 +47,15 @@ in {
# Scale down CPU frequency when load is low.
powerManagement.cpuFreqGovernor = "ondemand";
# Overlays for unstable and out-of-tree packages.
nixpkgs.overlays = [
(_self: super: {
zedhook = super.callPackage ./lib/pkgs/zedhook.nix {
buildGoModule = unstable.buildGo118Module;
};
})
];
# Packages specific to this machine. The base package set is defined in
# lib/system.nix.
environment.systemPackages = with pkgs; [
@ -53,6 +64,9 @@ in {
sqlite
zfs
zrepl
# Unstable and out-of-tree packages.
zedhook
];
services = {