Imported from yDog-1/nix-config (
AGENTS.md). Install upstream withnpx skills add yDog-1/nix-config. Copyright stays with the author.
AGENTS.md
Configuration Boundaries
- This flake has three independently applied outputs for one
x86_64-linuxmachine:nixosConfigurations.ydog-1, standalonehomeConfigurations."ydog-1", andnput.x86_64-linux.ydog-1. Applying one does not apply the others. - NixOS starts at
hosts/ydog-1/default.nix; Home Manager starts athome/ydog-1/default.nix. Nix modules are not auto-discovered, so import new modules from those entrypoints or an existingmodules/{nixos,home}aggregator. nput/ydog-1/file-tree.nixautomatically includes every regular file belownput/ydog-1/.config; these files and.gitconfigbecome live out-of-store symlinks, not Home Manager files.- The checkout path is intentionally fixed at
/home/ydog-1/nix-config: bothprograms.nh.flakeand nput's out-of-store symlinks depend on it. Do not make the configuration relocation-safe as incidental cleanup. - The overlays in
flake.nixapply to Home Manager, checks, packages, and the dev shell, but not to the separately constructed NixOSpkgs. Do not assume a package override used by Home Manager exists in NixOS.
Commands
nix fmtruns all repository hooks over all files: actionlint, alejandra, deadnix, statix, and stylua. It is not formatting-only.nix flake check --print-build-logsis the main local check; it runs the hooks and builds both the NixOS closure and Home Manager activation package.- Focused builds are
nix build .#nixosConfigurations.ydog-1.config.system.build.toplevelandnix build .#homeConfigurations.ydog-1.activationPackage. - CI additionally builds every
packages.x86_64-linuxoutput; the current local equivalent isnix build --no-link .#ai-usagebar .#nput. - Changes under
nput/need the separate manifest checknix build --no-link .#nput.x86_64-linux.ydog-1; this output is not covered by the package build above. - Apply configuration only when requested:
nh os switch,home-manager switch --flake .#ydog-1, andnix develop --command nput apply ydog-1apply the NixOS, Home Manager, and nput outputs respectively.
Ownership Gotchas
- NixOS owns the Hyprland package, greetd/UWSM session, Xwayland, and portals in
modules/nixos/desktop.nix. Home Manager only places the nativehyprland.lua; do not enablewayland.windowManager.hyprlandor add another Hyprland package/portal there. - Edit
modules/home/desktop/hyprland/hyprland.luadirectly; Hyprland loads it as native configuration andnix fmtformats it with stylua. - OpenCode's editable base config is
modules/home/ai/opencode/opencode.json.default.nixmerges MCP settings into the generated~/.config/opencode/opencode.json; do not add a rootopencode.jsonor edit the generated target. - Neovim ownership is split: nput owns the ordinary files under
nput/ydog-1/.config/nvim, while Home Manager owns the wrapped executable and generatednvim/lsp/nixd.lua. - Treat
hosts/ydog-1/hardware-configuration.nixas generated hardware data; put normal system changes inmodules/nixosdespite the generated file's stale/etc/nixos/configuration.nixcomment. - Sunshine is deliberately sourced from
nixpkgs-25-05inmodules/nixos/gaming.nix, while the rest of the flake tracks unstable. Do not normalize that pin without checking the compatibility reason.
Secrets And Compatibility
secrets/default.yamlcontains encrypted SOPS data and may be committed; the private age key is external at${XDG_CONFIG_HOME}/sops/age/keys.txtand is required for Home Manager activation..sops.yamlonly matchessecrets/*.yaml, not nested secret directories.networking.hostNameintentionally remainsnixos, despite the output and user being namedydog-1.system.stateVersion = "25.11"andhome.stateVersion = "25.05"are compatibility pins, not package versions; never bump them during unrelated work.
