openlogi 0.7.0

OpenLogi command-line interface — a local-first companion for Logitech HID++ peripherals.
name: Nix CI

# Build the Nix package (flake `.#openlogi`) so it can't silently rot — the
# failure mode that killed the previous flake (#262).
#
# It runs weekly rather than per change, because the cost and the risk are
# wildly mismatched. A full Linux build of this workspace takes ~20 minutes
# and is by far the most expensive job in CI, while in 60 runs this one has
# never failed — and the flake is not an install path anyone is pointed at:
# the README ships `.deb` / `.rpm` / `.pkg.tar.zst` for Linux. What can rot it
# is nixpkgs-unstable drifting, a new `-sys` dependency needing a buildInput,
# or a bumped git pin invalidating an `outputHashes` entry. None of those are
# urgent enough to make every contributor wait for them; noticing within a
# week is fine, and the failing build prints the hash to paste.
#
# Editing the flake or the package expression *is* the moment a break is
# likely and the feedback is worth having immediately, so those paths still
# trigger it on their own PR. `workflow_dispatch` covers "I want to check
# this now" — e.g. after bumping a git pin in Cargo.lock.
on:
  schedule:
    # Mondays, 04:17 UTC. Off-peak, and far from the release cadence.
    - cron: "17 4 * * 1"
  workflow_dispatch:
  pull_request:
    paths:
      - "flake.nix"
      - "flake.lock"
      - "nix/**"
      - ".github/workflows/nix.yml"

jobs:
  build:
    name: nix build (Linux)
    runs-on: ubuntu-latest
    # GHA cache upload for store paths (magic-nix-cache). Read is enough for
    # restoring; write is needed when the job is allowed to populate the cache
    # (push to master / same-repo PR). Fork PRs still restore but cannot write.
    permissions:
      contents: read
      actions: write
    steps:
      - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
      - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
      - uses: DeterminateSystems/magic-nix-cache-action@908b263ff629f4cc17666315b7fd3ec127c6244d # v14
        with:
          # Prefer GitHub Actions cache only — no FlakeHub account required.
          use-gha-cache: enabled
          use-flakehub: disabled
      - run: nix build .#openlogi -L