Move the imperative SSH-key-related scars accumulated during the clan/VPS rollout into nix config so future installs and rebuilds reproduce the same state: - danny@sunken-ship + danny@phantom-ship: trust the mac admin key (id_ed25519_<host> on Daniel-Macbook-Air) and the host's own self-loopback key (used by clan ssh-ng:// nix-copy-closure back to the same host during `clan machines update`). - root@sunken-ship + root@phantom-ship: trust the mac admin key so `clan machines update` can run its SOPS-key upload step that SSHes to root@<host> to write /var/lib/sops-nix/key.txt. Existing key files (~/.ssh/id_ed25519 on each host) stay where they are; the keypair was generated once during initial bootstrap and the public side is now declared above. Reinstalls would regenerate and need the pubkey re-pinned here. |
||
|---|---|---|
| .. | ||
| home/danny | ||
| hosts | ||
| disko-cloud.nix | ||
| disko-server.nix | ||
| fish.nix | ||
| installer-iso.nix | ||
| neovim.nix | ||
| ollama.nix | ||
| readme.md | ||
| server-configuration-with-flakes.nix | ||
| server-install-configuration.nix | ||
| wsl.conf | ||
NixOS modules
Host-specific NixOS and home-manager modules live under this dir:
hosts/<machine>.nix+hosts/<machine>-hardware.nixhome/danny/home.nix(home-manager)fish.nix,neovim.nix,ollama.nix,installer-iso.nix,disko-server.nix
The flake itself (flake.nix, flake.lock, flake-modules/, lib/, modules/, sops/, vars/) lives at the repo root, not here. See CLAUDE.md at the repo root for rebuild commands, clan.lol operations, and the dotfiles-rebuild timer.
Quick rebuild reference
# macOS
cd ~/dotfiles && darwin-rebuild switch --flake .
# WSL
sudo nixos-rebuild switch --flake ~/dotfiles#wsl
# Servers (via clan from mac)
nix run git+https://git.clan.lol/clan/clan-core#clan-cli -- \
machines update sunken-ship --flake ~/dotfiles
Server bootstrap (one-time)
nix run --extra-experimental-features "nix-command flakes" nixpkgs#git -- \
clone https://github.com/DannyDannyDanny/dotfiles.git /tmp/dotfiles
sudo mv /tmp/dotfiles /etc/dotfiles
sudo nixos-rebuild switch --flake /etc/dotfiles#sunken-ship \
--option accept-flake-config true
If the daemon doesn't have flakes: copy server-configuration-with-flakes.nix to /etc/nixos/configuration.nix, sudo nixos-rebuild switch, then build the flake.
SSH keys (not in repo): scp ~/.ssh/*.pub danny@server:/tmp/, then on server mkdir -p ~/.ssh; cat /tmp/*.pub >> ~/.ssh/authorized_keys. See docs/ssh-and-secrets.md.
No git in PATH: sudo nix run nixpkgs#git -- -C /etc/dotfiles pull origin main.