diff options
| author | lassulus <git@lassul.us> | 2026-01-11 01:29:31 +0100 |
|---|---|---|
| committer | lassulus <git@lassul.us> | 2026-01-11 01:29:31 +0100 |
| commit | 68d3c925b0edb958fcbafa589d35967dfb2a979c (patch) | |
| tree | 82018f93e411fcad47cb45867c646ce0f8feb683 /krebs/5pkgs/simple/logf | |
| parent | 39ef2da7d30dba7c5c1556ffa90d330a9607bb44 (diff) | |
5pkgs: fix nix flake show compatibility
Integrate nix-writers flake for extended writer functions (writeJq,
writeGawkBin, etc.) using a fixpoint overlay so functions can reference
each other.
Update Python packages to new buildPythonPackage format:
- Add pyproject = true and build-system for ovh-zone, python-dnsstamps,
ssh-audit, tinc_graphs
Fix writer function usage by taking them as arguments instead of
accessing via pkgs:
- nixos-format-error, untilport, qrscan, logf, gitignore, urix, etc.
Update deprecated nixpkgs attribute names:
- gdk_pixbuf -> gdk-pixbuf
- libSM/libX11/libXinerama -> xorg.*
- buildGo120Module -> buildGoModule
Remove obsolete/broken packages:
- buildbot-classic-slave (missing buildbot-classic)
- cac-panel, drivedroid-gen-repo (Python 2 / format issues)
- games-user-env, generate-secrets (unused)
- internetarchive, bepasty-client-cli, krebspaste (Python 2)
- qrscan (conflicts with removed nixpkgs package)
Other fixes:
- Use lib.callPackageWith for package interdependencies
- Only export derivations in flake packages output
- Limit packages output to Linux systems
- Fix IFD in ukrepl by passing path to writer instead of readFile
- Import stockholm.lib directly where needed (bling)
- Rewrite brain and git-hooks to use runCommand
Diffstat (limited to 'krebs/5pkgs/simple/logf')
| -rw-r--r-- | krebs/5pkgs/simple/logf/default.nix | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/krebs/5pkgs/simple/logf/default.nix b/krebs/5pkgs/simple/logf/default.nix index 36a7fed2f..3a4c84de2 100644 --- a/krebs/5pkgs/simple/logf/default.nix +++ b/krebs/5pkgs/simple/logf/default.nix @@ -1,9 +1,9 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, writeDash, writeDashBin, writeJSON, writeJq, ... }: let - default-host-colors = pkgs.writeJSON "logf.default-host-colors.json" { + default-host-colors = writeJSON "logf.default-host-colors.json" { }; - default-prio-colors = pkgs.writeJSON "logf.default-prio-colors.json" { + default-prio-colors = writeJSON "logf.default-prio-colors.json" { "0" = 196; # emerg "1" = 160; # alert "2" = 124; # crit @@ -14,17 +14,17 @@ let "7" = 139; # debug "-" = 005; # undefined priority }; - default-urgent = pkgs.writeJSON "logf.default-urgent.json" [ + default-urgent = writeJSON "logf.default-urgent.json" [ ]; in -pkgs.writeDashBin "logf" '' +writeDashBin "logf" '' export LOGF_HOST_COLORS LOGF_PRIO_COLORS LOGF_URGENT LOGF_HOST_COLORS=$(cat "''${LOGF_HOST_COLORS-${default-host-colors}}") LOGF_PRIO_COLORS=$(cat "''${LOGF_PRIO_COLORS-${default-prio-colors}}") LOGF_URGENT=$(cat "''${LOGF_URGENT-${default-urgent}}") printf '%s\0' "$@" \ - | ${pkgs.findutils}/bin/xargs -0 -P 0 -n 1 ${pkgs.writeDash "logf-remote" '' + | ${pkgs.findutils}/bin/xargs -0 -P 0 -n 1 ${writeDash "logf-remote" '' target=$1 target_host=$(echo "$1" | sed 's/^.*@//;s/\..*//') exec 3>&1 @@ -32,7 +32,7 @@ pkgs.writeDashBin "logf" '' -o PreferredAuthentications=publickey \ -o StrictHostKeyChecking=yes \ exec journalctl -af -n 0 -o json \ - | stdbuf -oL jq -Rcf ${pkgs.writeJq "logf-remote-error.jq" '' + | stdbuf -oL jq -Rcf ${writeJq "logf-remote-error.jq" '' { PRIORITY: "4", MESSAGE: ., @@ -42,7 +42,7 @@ pkgs.writeDashBin "logf" '' sleep 10m exec "$0" "$@" ''} \ - | ${pkgs.jq}/bin/jq -Rrf ${pkgs.writeJq "logf-filter.jq" '' + | ${pkgs.jq}/bin/jq -Rrf ${writeJq "logf-filter.jq" '' (env.LOGF_HOST_COLORS | fromjson) as $host_colors | (env.LOGF_PRIO_COLORS | fromjson) as $prio_colors | (env.LOGF_URGENT | fromjson | map("(\(.))") | join("|")) |
