From 77fe45f814ca851e05c35e5bad61d8a4e34a2472 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Tue, 23 Dec 2025 15:43:26 +0000 Subject: [PATCH] agents.md --- AGENTS.md | 31 +++++++++++++++++++++++++++++++ flake.nix | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..2a30764 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,31 @@ +# AGENTS.md + +## ⚠️ VERSION CONTROL: JUJUTSU (jj) ONLY +**NEVER run git commands.** This repo uses Jujutsu (`jj`). Use `jj status`, `jj diff`, `jj commit`, etc. + +## Build Commands +```bash +nix run .#build # Build current host config +nix run .#build -- # Build specific host (chidi, jason, michael, mindy, tahani) +nix run .#apply # Build and apply locally (darwin-rebuild/nixos-rebuild switch) +nix flake check # Validate flake + +# Remote NixOS deployment (colmena) +colmena build # Build all NixOS hosts +colmena apply --on # Deploy to specific NixOS host (michael, mindy, tahani) +colmena apply # Deploy to all NixOS hosts +``` + +## Code Style +- **Formatter**: Alejandra with tabs (run `alejandra .` to format) +- **Function args**: Destructure on separate lines `{inputs, pkgs, ...}:` +- **Imports**: Use relative paths from file location (`../../profiles/foo.nix`) +- **Attribute sets**: One attribute per line, trailing semicolons +- **Lists**: `with pkgs; [...]` for packages, one item per line for long lists + +## Structure +- `hosts//` - Per-machine configs (darwin: chidi, jason | nixos: michael, mindy, tahani) +- `profiles/` - Reusable program/service configs (imported by hosts) +- `modules/` - Custom NixOS/darwin modules +- `lib/` - Shared constants and utilities +- `secrets/` - SOPS-encrypted secrets (`.sops.yaml` for config) diff --git a/flake.nix b/flake.nix index 11db26b..7c80052 100644 --- a/flake.nix +++ b/flake.nix @@ -102,7 +102,7 @@ flake.colmena = { meta = { - nixpkgs = import inputs.nixpkgs {localSystem = "x86_64-linux";}; + nixpkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; specialArgs = {inherit inputs user constants;}; }; }