# AGENTS.md - Guidelines for Agentic Coding in Azos This is a NixOS/Nix flake-based configuration repository using home-manager for dotfiles and system configuration. ## Build Commands ### Evaluating Configuration ```bash # Evaluate system config (Lauretta laptop) nix eval .#nixosConfigurations.lauretta.config.system.build.toplevel # Evaluate flake info nix flake show # Evaluate all outputs nix eval . --apply 'x: x' ``` ### Building ```bash # Build VM nix build .#nixosConfigurations.vm.config.system.build.vm # Or with submodules nix build '.?submodules=1#nixosConfigurations.vm.config.system.build.vm' # Build formatter (alejandra) nix build .#formatter.x86_64-linux ``` ### Deploying ```bash # Switch to new config (Lauretta) sudo nixos-rebuild switch --flake '.?submodules=1#lauretta' # Update flake inputs nix flake update # Update specific input nix flake lock --update-input azos-core ``` ### Nix REPL ```bash nix repl :lf . # Then explore with: inputs.nixpkgs.lib ``` ### Dev Shell ```bash nix develop .#shells.x86_64-linux.debugTexShell ``` ### Garbage Collection ```bash sudo nix-collect-garbage --delete-old ``` ## Linting/Formatting This project uses [alejandra](https://github.comkamadorama/alejandra) as the formatter. ```bash # Format all Nix files nix fmt # Or use alejandra directly alejandra . ``` There are no automated tests in this repository. VM testing is manual: ```bash # Build and run VM nix build .#nixosConfigurations.vm.config.system.build.vm ./result/bin/run-nixos-vm ``` ## Code Style Guidelines ### File Organization - **Home-manager modules**: `modules/home-manager/.nix` - **NixOS modules**: `modules/nixos/.nix` - **Imports**: All modules are imported in `modules/home-manager/default.nix` and `modules/nixos/default.nix` - **Import sorting**: Alphabetical order in default.nix files ### Nix Module Structure Follow this template for home-manager modules: ```nix { lib, config, pkgs, ... }: let isEnabled = config.azos..enable; in { options.azos..enable = lib.mkOption { default = true; example = true; type = lib.types.bool; }; config = lib.mkIf isEnabled { home.packages = with pkgs; [ ]; }; } ``` ### Naming Conventions - **Option paths**: `config.azos..