https://github.com/marcuswhybrow/flake-updates
Displays time delta between a flake's nixpkgs input commit and the latest GitHub commit
https://github.com/marcuswhybrow/flake-updates
Last synced: 3 months ago
JSON representation
Displays time delta between a flake's nixpkgs input commit and the latest GitHub commit
- Host: GitHub
- URL: https://github.com/marcuswhybrow/flake-updates
- Owner: marcuswhybrow
- Created: 2023-11-29T14:08:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T18:58:18.000Z (7 months ago)
- Last Synced: 2025-01-25T20:26:34.205Z (5 months ago)
- Language: Nix
- Size: 70.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
nix run github:marcuswhybrow/flake-updates -- --flake /path/to/flake-dir
``````
❯ flake-updates --help
Usage: flake-updates [OPTIONS]Options:
-f, --flake Path to a nix flake.lock file, or it's parent directory [default: .]
-t, --ttl The "Time To Live" of cached GitHub API requests before being considered stale. Caching GitHub API requests avoids rate limiting denials at the cost of data freshness [default: 60] [aliases: poll] [short aliases: p]
-o, --output Output string format ("%s is replaced with the number of updates")
-d, --defer Immediately return any currently cached data regardless of --ttl, and asynchronously consider regenerating the cache as a background task
-h, --help Print help
-V, --version Print version
```Works great for a custom [Waybar](https://github.com/Alexays/Waybar) module:
```
{
"custom/updates": {
"exec": "flake-updates --flake /path/to/flake-dir --output '%s updates'",
"interval": 1
}
}
```- Makes 1 GitHub API call per input by default.
- `flake-updates --help` for more options.
- Top tip, `flake-updates --ttl 0` busts the cache and always calls GitHub.