diff options
| author | Robby Zambito <contact@robbyzambito.me> | 2026-04-05 17:04:56 -0400 |
|---|---|---|
| committer | Robby Zambito <contact@robbyzambito.me> | 2026-04-05 19:44:06 -0400 |
| commit | 98be644662919e8af7081a3324962f06d6f862f1 (patch) | |
| tree | f18b7007f20f2b765aea1a33ea1599a223478812 | |
| parent | 09350e212d346bfa291e4b5930d0b75a5fe026b2 (diff) | |
feat: update AGENTS.md with ini specifics
| -rw-r--r-- | AGENTS.md | 32 |
1 files changed, 19 insertions, 13 deletions
@@ -15,13 +15,22 @@ This is a Guix Home Environment configuration repository. Declarative system and │ ├── sway.scm # Sway window manager config │ ├── emacs.scm # Emacs configuration │ ├── foot.scm # Foot terminal config -│ └── git.scm # Git configuration +│ ├── git.scm # Git configuration +│ └── ssh.scm # SSH client configuration ├── wofi/ # Wofi application launcher assets ├── config-generation/ # Helper modules for config generation └── reconfigure* # Convenience scripts for deployment ``` -**Module pattern:** Extract configurations into `config/*.scm` using `(define-library (config <name>))` with exported variables renamed in `home.scm` (e.g., `(rename (config git) (git-config rz/git-config))`). +**Module pattern:** Extract configurations into `config/*.scm` using `(define-library (config <name>))` with exported variables renamed in `home.scm`. + +**Configuration generation patterns:** + +- **`scm->ini` helper (foot.scm, git.scm):** Use the `scm->ini` function from the `ini` library to generate configuration files from association lists. Git config (INI format) and Foot terminal config (INI format) use this pattern. These modules export a single `<name>-config` string variable. + +- **Guix service records (ssh.scm, sway.scm):** Use native Guix service records like `openssh-host` and `sway-configuration`. The SSH module exports both host records for the `home-openssh-service-type` service and a config string for XDG deployment. SSH config uses native SSH format (key-value pairs under Host blocks), not INI format. + +- **String-based (emacs.scm):** Direct string content exported as `<name>-config` for XDG config files service deployment. ## Build, Test, and Development Commands @@ -29,7 +38,7 @@ This is a Guix Home Environment configuration repository. Declarative system and |---------|-------------| | `guix home reconfigure home.scm` | Apply home environment changes | | `guix system reconfigure system.scm` | Apply system-wide changes | -| `guix home reconfigure home.scm --dry-run` | Validate configuration without applying | +| `guix home build home.scm` | Validate and build configuration | | `./reconfigure-home` | Convenience script for home reconfiguration | | `./reconfigure-system` | Convenience script for system reconfiguration | @@ -38,17 +47,14 @@ This is a Guix Home Environment configuration repository. Declarative system and - **Indentation:** 8 spaces for Scheme files (Guix standard) - **File extensions:** `.scm` for all Scheme modules - **Module naming:** `(config <module-name>)` for extracted configurations -- **Variable naming:** Use `rz/` prefix for renamed exports (e.g., `rz/git-config`, `rz/sway-config`) +- **Variable naming:** Use `rz/` prefix for renamed exports (e.g., `rz/git-config`, `rz/sway-config`, `rz/ssh-config`) - **Comments:** Begin files with `;;;` for major sections, use `;;` for inline comments -**INI configuration pattern:** -```scheme -(define <name>-config - (parameterize - ((current-output-port (open-output-string))) - (scm->ini <data>) - (get-output-string (current-output-port)))) -``` +**Module export patterns:** + +- INI-based modules (foot.scm, git.scm) export `<name>-config` as string content +- Service-based modules (ssh.scm, sway.scm) export both service records and config file content where applicable +- String-based modules (emacs.scm) export `<name>-config` as string content ## Testing Guidelines @@ -66,7 +72,7 @@ This is a Guix Home Environment configuration repository. Declarative system and ## Agent-Specific Instructions - **Ignore backup files:** All files ending with `~` are backup/temporary files and should be ignored during analysis and modification. - - Check for existing `config/*.scm` modules before creating new ones - Use `home.scm` imports to understand the module dependency graph - Run validation commands before marking configuration changes complete +- **Configuration format awareness:** Distinguish between INI-based configs (git, foot) and native format configs (ssh, sway, emacs) when generating or modifying configuration content |
