nix-cache-watcher

Crates.ionix-cache-watcher
lib.rsnix-cache-watcher
version0.0.7
sourcesrc
created_at2022-09-13 04:27:34.749903
updated_at2022-09-17 06:51:21.696769
descriptionUpload new nix artifacts to an s3-compatible binary cache
homepage
repositoryhttps://sr.ht/~thatonelutenist/nix-cache-watcher
max_upload_size
id664236
size117,726
Nathan McCarty (nmccarty)

documentation

README

nix-cache-watcher

Table of Contents

About

A very WIP tool for uploading Nix build artifacts to an s3 compatible binary cache. This will eventually support direct upload to s3/b2, and possibly direct singing, but at the moment it shells out to the nix to perform those operations.

Takes a snapshot of your nix store state before your build, and then signs and uploads new installable afterwards.

Getting Started

Prerequisites

This program is only intended to run on systems with nix installed, and has the following dependencies:

  • xz
  • curl

Installing

Install though cargo:

cargo install nix-cache-watcher

or through Nix:

nix registry add nix-cache-watcher 'git+https://git.sr.ht/~thatonelutenist/nix-cache-watcher?ref=trunk'
nix build nix-cache-watcher# --profile /home/build/.nix-profile

Usage

See nix-cache-watcher --help for full syntax and options.

Before starting your build, you must take a snapshot of the current nix store state:

nix-cache-watcher save-store

Then, run your build. After your build completes, first sign the new store paths, and then send them off for upload:

nix-cache-watcher sign-store -k $PATH_TO_KEY
nix-cache-watcher upload-diff -r "$CACHE_URI" -v

Note: you must already have your AWS SDK credentials configured for this to work.

Commit count: 0

cargo fmt