Guidance for AI coding agents working on this repository.
A single-user NixOS flake (hostname nixos, user cloudglides) managing an
entire desktop system + home environment. Built with nixos-unstable.
flake.nix— entrypoint; flake inputs, overlay,nixosConfiguration. Home-manager is wired in as a NixOS module (useGlobalPkgs = true,useUserPackages = true).modules/nixos/— system-level config.configuration.nixis the main file;hardware-configuration.nixis machine-generated and gitignored.modules/home-manager/— per-app/user config, onedefault.nixper app, grouped:editors/— neovimterminals/— fish, ghosttyutilities/— fastfetch, tmux, vesktopdefault.nix— imports all submodules + global home settings (packages, git, gpg, direnv)
pkgs/— wrapper packages that ship config files as store paths (builtins.path+stdenv.mkDerivationthatcp -rs into$out):pkgs/ghostty/ghostty/— ghosttyconfig+shaders/*.glslpkgs/neovim/nvim/— Neovim config (own git repo, lazy.nvim based)
assets/— wallpaper + icons, exposed system-wide viaenvironment.etc."icons".secrets.yaml— SOPS-encrypted secrets (decrypted by sops-nix at activation).
- Build/check the whole flake:
nix flake check(always run after editing config) - Rebuild the system:
sudo nixos-rebuild switch --flake .#nixos - Update inputs:
nix flake update - Eval a config value:
nix eval .#nixosConfigurations.nixos.config.<path>
- One
default.nixper app undermodules/home-manager/.... New tools follow this pattern. - Modules use compact function-arg style:
{pkgs, ...}: { ... }. When a module defines options (mkEnableOption/mkIf), the args includeconfigandlib(see tmux module). - The overlay in
flake.nixprovides custom packages:cloudglides-ghostty,cloudglides-nvim. Custom packages arecallPackage'd, not added to nixpkgs. home.packagesis the catch-all for user packages (seemodules/home-manager/default.nix).- Use
with pkgs;insidehome.packageslists. - Always commit unsigned —
commit.gpgsign = trueis set globally and signing prompts for a GPG password, which hangs. Append--no-gpg-signto everygit commit. - Never hardcode secrets in
.nixfiles. Git identity, etc. lives insecrets.yamland is referenced via/run/secrets/...paths (sops-nix). To add a secret:sops secrets.yaml, then add asops.secrets.<name>entry inmodules/nixos/configuration.nix. hardware-configuration.nixis gitignored — regenerate per-machine, don't commit.- Ghostty config/shaders and the neovim config live in
pkgs/as store-path packages, symlinked into~/.config/by home-manager. Edit the files underpkgs/*/..., not/home/cloudglides/.config/...directly (those are home-manager-managed symlinks).
- Ghostty relies on the system OpenGL driver via
hardware.graphics.enable = true. "Failed to create EGL display" usually means a stale profile (old ghostty version), not a config bug — rebuild first. - The shell is fish;
programs.fishholds shell init + aliases. - Flatpak packages are declared via
services.flatpak.packagesin home-manager. resultsymlink in the repo root is a build artifact (not tracked).