Stage 4a of the dendritic + clan migration. Both servers now live under clan.machines (via nixos/flake-modules/clan.nix) and clan-core generates their nixosConfigurations for us; the previous per-host flake-modules are removed. Notes: - clan.core.enableRecommendedDefaults = false on both machines so we keep the existing dhcpcd / non-networkd / non-resolved stack. Services like dnsmasq, navidrome, and the existing wireless setup break with the clan defaults on. - dotfiles-rebuild timer is untouched (safety net). Replacing it with clan machines update / dm-pull-deploy comes in 4e. - mac stays outside the clan as admin only. Verified: `clan machines list --flake path:…/nixos` returns both hosts; both servers rebuild cleanly and all services (navidrome, cloudflare- tunnel, fitness-bot, dnsmasq, openclaw-gateway, sshd) stay active. |
||
|---|---|---|
| .. | ||
| flake-modules | ||
| home/danny | ||
| hosts | ||
| lib | ||
| modules | ||
| disko-server.nix | ||
| fish.nix | ||
| flake.lock | ||
| flake.nix | ||
| installer-iso.nix | ||
| neovim.nix | ||
| ollama.nix | ||
| readme.md | ||
| server-configuration-with-flakes.nix | ||
| server-install-configuration.nix | ||
| wsl.conf | ||
NixOS flake
Rebuild from dotfiles dir:
# macOS
cd ~/dotfiles/nixos && darwin-rebuild switch --flake .
# WSL
sudo nixos-rebuild switch --flake ~/dotfiles/nixos#wsl
# sunken-ship (on server)
sudo nixos-rebuild switch --flake /etc/dotfiles/nixos#sunken-ship
Server (sunken-ship)
One-time bootstrap (no git until first rebuild):
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/nixos#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, run sudo nixos-rebuild switch, then build and switch to the flake (see server-quickstart.md for SSH keys).
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.
Timer: every 15 min the server pulls and rebuilds when main changes. Config: hosts/sunken-ship.nix, hosts/sunken-ship-hardware.nix.
No git in PATH: sudo nix run nixpkgs#git -- -C /etc/dotfiles pull origin main.