Skip to content

0x77dev/land

Repository files navigation

land

NixOS nix-darwin Home Manager Snowfall Lib ci License: WTFPL Maintained

Declarative infrastructure using Nix flakes and Snowfall Lib.

Architecture

Reproducibility - Declarative configuration with pinned dependencies. Identical builds across machines and environments.

Convention over Configuration - Snowfall Lib infers outputs from directory structure. Minimal boilerplate.

Distributed Builds - Cross-platform compilation configured automatically. Darwin builds Linux, x86_64 builds aarch64.

Scope

  • Darwin - System configuration via nix-darwin
  • NixOS - Server and workstation configurations
  • WSL 2 - NixOS on Windows with GPU passthrough
  • Home Manager - User environments and dotfiles
  • Secrets - sops-nix with SSH host keys
  • Packages - Custom derivations and unstable overlays

Deployment

Darwin

Initial bootstrap requires sandbox disabled on macOS:

git clone https://github.com/0x77dev/land.git
cd land
sudo nix run nix-darwin --experimental-features 'nix-command flakes' -- \
  switch --flake .#potato --option sandbox false

Subsequent updates:

darwin-rebuild switch --flake .#potato

NixOS

git clone https://github.com/0x77dev/land.git
cd land
sudo nixos-rebuild switch --flake .#muscle

WSL 2

Requirements: Windows 11, WSL 2.4.4+, NVIDIA driver for GPU support.

Setup WSL:

wsl --install --no-distribution
wsl --update

Build tarball:

nix build github:0x77dev/land#nixosConfigurations.muscle-wsl.config.system.build.tarballBuilder
sudo ./result/bin/nixos-wsl-tarball-builder

Import to Windows:

wsl --import muscle-wsl $env:USERPROFILE\muscle-wsl nixos-wsl.tar.gz --version 2
wsl -d muscle-wsl

Verify GPU:

nvidia-smi
docker run --rm --device=nvidia.com/gpu=all \
  nvcr.io/nvidia/cuda:12.0.0-base-ubuntu22.04 nvidia-smi

Systems

Host Platform Role Specs
potato aarch64-darwin Workstation M4 Max, 48GB
tomato x86_64-linux Homelab MS-01, i9-13900H, 96GB
pickle x86_64-linux Homelab MS-01, i9-13900H, 96GB
beefy aarch64-darwin Media M2 Ultra, 64GB
muscle x86_64-linux AI/Compute TR 7985WX, RTX6000, 250GB
muscle-wsl x86_64-linux AI/Compute (WSL) TR 7985WX, RTX6000, 250GB
shadow x86_64-linux Fun T480, 16GB

Stack

Nix (Lix), NixOS, nix-darwin, Home Manager, Snowfall Lib, sops-nix, NixOS-WSL

Development

nix develop
nix flake check
nix flake update

See CONTRIBUTING.md for conventions.

License

WTFPL

Contributors 2

  •  
  •