From ebad39adab212ab4e26f9a98befa0048c7eea710 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:24 +0100 Subject: feat(nix): hybrid setup with flakes + direnv for per-project dev shells MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Install Nix (multi-user daemon) on Arch and wire up direnv so any project can declare its toolchain in a flake.nix and get a hermetic dev shell on cd. No NixOS, no home-manager, no migration off paru/chezmoi — just one new package manager scoped to project dev shells. - meta/nix.txt: nix from extra repo - meta/dev.txt: direnv (general-purpose, not nix-specific) - systemd-units/system/nix.txt: nix-daemon.socket (socket-activated) - etc/nix/nix.conf: enable flakes + nix-command, trusted-users=@wheel, auto-optimise-store, keep-outputs/derivations so direnv envs survive GC - dot_config/direnv/direnvrc: load nix-direnv 3.1.1 via source_url with pinned sha256 (not packaged for Arch; refusing -git AUR) - dot_config/nix/templates/{flake.nix,dev/}: flake template usable via 'nix flake init -t ~/.config/nix/templates' - dot_config/zsh/dot_zshrc: 'eval "$(direnv hook zsh)"' --- meta/dev.txt | 1 + meta/nix.txt | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 meta/nix.txt (limited to 'meta') diff --git a/meta/dev.txt b/meta/dev.txt index bca1348..5f26ad7 100644 --- a/meta/dev.txt +++ b/meta/dev.txt @@ -1,6 +1,7 @@ android-tools curl difftastic +direnv git-absorb git-delta github-cli diff --git a/meta/nix.txt b/meta/nix.txt new file mode 100644 index 0000000..e5c4bb4 --- /dev/null +++ b/meta/nix.txt @@ -0,0 +1,16 @@ +# Nix package manager (multi-user daemon mode). +# +# Used purely for hermetic per-project dev shells via `nix develop` + +# direnv `use flake`. Not a replacement for paru/pacman, not home-manager, +# not NixOS — just a sandboxed second package manager that gives every +# project a reproducible toolchain pinned in its own flake.lock. +# +# Pairs with: +# - systemd-units/system/nix.txt (enables nix-daemon.socket) +# - etc/nix/nix.conf (flakes, trusted-users=@wheel, GC roots) +# - dot_config/direnv/direnvrc (loads nix-direnv; pinned via source_url) +# - dot_config/nix/templates/ (flake templates: nix flake init -t ~/.config/nix/templates) +# +# nix-direnv itself is not packaged for Arch — it's loaded at runtime via +# direnv's source_url with a content hash, so no extra package needed. +nix -- cgit v1.3.1