guix weather
.
.config | ||
.forgejo | ||
.github | ||
crates | ||
LICENSES | ||
.envrc | ||
.gitignore | ||
.rustfmt.toml | ||
.versionrc | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
deny.toml | ||
flake.lock | ||
flake.nix | ||
justfile | ||
LICENSE.txt | ||
README.md | ||
REUSE.toml |
Nix Weather - Check Cache Availablility of NixOS Configurations
A fast rust tool to check availability of your entire system in caches. It so
to speak "checks the weather" before going to update. Heavily inspired by guix weather
.
Usage
Note
Currently,
nix-weather
only has first-class support for flakes.
General usage would be like this:
nix-weather --name myhost --config ~/git/my-nixos-config
Here, we specify the name of the host, as specified at the flake output
nixosConfiguration
, and a path to the NixOS configuration flake.
How It Works
The basic idea is that we construct a set of all requisites to build the top-level of a NixOS configuration, and then query Nix cache(s) for the narinfo. By doing this in a high concurrency, parallel task runner (i.e. tokio async runtime), and only querying the headers for status codes, we can reach impressive speeds, typically around 45~ network time.
One of the biggest limiting factors regarding speed is building the
config.system.toplevel
, and finding the necessary requisites with nix-store
.
Caching the requisites is a future goal, so that we only have to build the
toplevel
, and then match against its derivation in cache, which should cut
down the nix part of the runtime by ~80%.
Contributing
For information on contributing, please see CONTRIBUTING.md.