Skip to content

pog ​

pog is a CLI wrapper generator built with Nix. In this repo it is one of the main reasons the package layer feels ergonomic instead of austere.

How This Repo Uses It ​

  • default.nix imports pog into the shared package set.
  • mods/pog/*.nix defines domain-specific command collections.
  • home.nix installs many of those generated command sets directly into the user environment.

High-Value Areas ​

  • mods/pog/aws.nix
  • mods/pog/curl.nix
  • mods/pog/gcp.nix
  • mods/pog/k8s.nix
  • mods/pog/docker.nix
  • mods/pog/general.nix
  • mods/pog/nix.nix

One Repo Command ​

mods/pog/nix.nix defines overlay-diff with pog. From the repo root, run:

bash
nix run .#overlay-diff -- --custom

It prints the local overlay attributes discovered under pkgs/ and where they were declared. This is a generated CLI from a Nix definition, with its flags and help kept beside the command body. Daily Workflows has more overlay commands.

Example: bezel_intake (mods/pog/curl.nix) ​

mods/pog/curl.nix defines bezel_intake to send a JSON report to a bezel intake. Set BEZEL_INTAKE_URL and BEZEL_INTAKE_SECRET (or pass --url and --secret), then send a title and details:

bash
bezel_intake --title "nightly backup failed" --body "exit 2: disk full"
bezel_intake --title "nightly backup failed" --body-file backup.log
bezel_intake --title "nightly backup failed" --body-file - < backup.log

Use either --body or --body-file; - reads stdin. Keep the title stable to group repeat reports, and put changing details in the body. Optional --link URL adds a source link; map the intake's url field to /url to use it. HTTP errors exit nonzero and preserve the response body. The intake's settings control whether bezel files a proposal or starts an investigation or fix.

Why It Fits Here ​

  • The generated CLIs share flags, completion behavior, and help output.
  • Repetitive shell snippets become versioned Nix code instead of dotfile trivia.
  • Repo-local operational workflows stay close to the package and host definitions they support.