Skip to content

Instantly share code, notes, and snippets.

Well my approach is a fundamental shift in how we would run a Nix evaluation, based on 10 years of being annoyed at how costly evaluation can be sometimes, and the experience I gained in that time from Nix and software engineering in general.

So far includes two components, a novel Nix module system that actually provides sensible boundaries for Nix code for not much cost (it is actually insanely fast compared to the NixOS module system). This piece makes the Nix code bounded and trvially statically analyzeable. It perpusefully bucks the trend of depending on nixpkgs and being super complex and heavy. The core of it took me two hours to write and I have kept it purposefully small since. Besides performance and predictability, another nice feature is trivial tracing (unlike the monsterous traces produced by the nixos module system). There is still some work to do to integrate it more cleanly with my CLI, and I am almost at that stage.

As for the Rust based cli, there are a few core planned features but right

@nrdxp
nrdxp / extensions.nix
Created September 27, 2022 21:04
extending `std` actions
{
std,
nixpkgs,
...
}: {
nomadJobManifests = name: let
type = std.nomadJobManifests name;
in
type
// {
@nrdxp
nrdxp / sbt-lock.sh
Last active May 11, 2022 21:44
SBT lock file
REPO_DIR="$(git rev-parse --show-toplevel)"
LOCK_FILE="$REPO_DIR/nix/cloud/packages/<ommited>/deps.lock"
cd $REPO_DIR
# We want our lock file to be reproducible so ensure the cache from previous runs is removed
rm -rf .nix
# This is for CI to check if the lockfile has changed
if eval __argCheck__; then
lock_hash=$(nix hash file "$LOCK_FILE")