# Host Naming Discrepancy Report This report compares the current `modules/hosts` tree against the naming rules for new hosts in `hosts.instructions.md`. ## Rules Checked - The host directory slug should be the canonical host identity. - A directory-backed host should prefer `default.nix` as its main entrypoint. - The canonical slug should line up with the primary `hostname` binding, `flake.nixosConfigurations.`, and `networking.hostName`. - A host-local Home Manager module should use the same slug. - A standalone Home Manager configuration should prefer the key `"@"`. - Host-local helper module names should be prefixed by the host slug. ## Summary - Recently normalized: `john-kde`, `omen-nixos`. - Hosts that fit the new rules closely: `janus`, `john-kde`, `omen-nixos`, `test-nix`. - Hosts with notable discrepancies: `john-p14s`, `soteria`. - Approved exception: `john-pc` directory uses immutable deployed slug `john-pc-ubuntu` for exported keys. ## Detailed Discrepancies ### `john-p14s` - The main host export uses the canonical slug: `flake.nixosConfigurations.john-p14s`. - The host-local helper modules are named `p14sConfiguration` and `p14sHardware`, which drop the `john-` prefix and therefore do not use the full host slug. - `networking.hostname` uses the correct host value, but the option name differs from the dominant `networking.hostName` spelling used elsewhere in this tree. ### `john-pc` - Approved exception for immutable deployed hostname: - Directory slug is `john-pc`, but exported keys and hostname bindings intentionally use `john-pc-ubuntu`. - `hostname` binding, `flake.modules.homeManager.`, and `flake.homeConfigurations` are aligned to `john-pc-ubuntu`. - Shared SSH alias intentionally remains `john-pc-ubuntu` in `modules/services/ssh.nix`. ### `omen-nixos` - No active discrepancy after normalization: - The directory slug, `flake.nixosConfigurations` key, host-local module keys, and `networking.hostName` are now aligned to `omen-nixos`. ### `john-kde` - No active discrepancy after normalization: - The directory slug, `hostname` binding, host-local Home Manager module key, and standalone Home Manager key are now aligned to `john-kde`. ### `soteria` - Naming is mostly coherent across directory slug, `hostname`, `flake.nixosConfigurations.soteria`, and `flake.modules.homeManager.soteria`. - The standalone Home Manager export is `flake.homeConfigurations.soteria`, which does not follow the preferred `"@"` form. - The main host entrypoint is `soteria.nix` instead of the preferred `default.nix`. ## No Discrepancy Found ### `janus` - Directory slug, `hostname`, `flake.nixosConfigurations.janus`, and `networking.hostName` are aligned. - The host-local helper module `janus-ca` is clearly prefixed by the host slug. ### `test-nix` - The single-file host uses the same slug for the file stem, `hostname`, and `flake.nixosConfigurations.test-nix`. - It does not define `networking.hostName`, but it does not contradict the slug anywhere else. ## Follow-up Candidates - Rename `john-p14s` helper module keys to include the full host slug (`john-p14s-*`) if strict slug consistency is desired. - Decide whether `soteria` should move to `default.nix` and whether its standalone Home Manager key should include `john@`. - If `john-pc-ubuntu` ever becomes changeable, decide whether to rename the directory to match or keep this as a permanent exception.