feat(nix): bootstrap clan-core for sunken-ship + phantom-ship 🏴‍☠️

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.
This commit is contained in:
DannyDannyDanny 2026-04-19 13:54:44 +02:00
parent 663be7872a
commit 29ff1c9be7
5 changed files with 235 additions and 42 deletions

View file

@ -0,0 +1,55 @@
# clan.lol wiring for the homelab.
#
# Declares `sunken-ship` and `phantom-ship` as clan machines. Each machine's
# `imports` list is the NixOS module set that used to live in its own
# flake-module. clan-core produces `flake.nixosConfigurations.<name>` from
# these, which is why the old per-host flake-modules were removed.
#
# The mac stays outside the clan — admin only, uses `clan machines update`
# to push to the servers.
{ config, inputs, ... }:
let
lib = inputs.nixpkgs.lib;
hmModule = { user, homeDirectory, stateVersion ? null, userImports ? [ ] }:
import ../lib/home-manager-user.nix {
inherit lib user homeDirectory stateVersion userImports;
};
in {
imports = [ inputs.clan-core.flakeModules.default ];
clan = {
meta.name = "homelab";
# Preserve current network / init stack (no systemd-networkd/resolved,
# no boot.initrd.systemd, no extra debug packages). Revisit per-service
# in later stages rather than flipping this fleet-wide.
machines.sunken-ship = {
imports = [
{ clan.core.enableRecommendedDefaults = false; }
../hosts/sunken-ship.nix
config.flake.nixosModules.dotfiles-rebuild
inputs.home-manager.nixosModules.home-manager
(hmModule {
user = "danny";
homeDirectory = "/home/danny";
stateVersion = "25.11";
})
];
};
machines.phantom-ship = {
imports = [
{ clan.core.enableRecommendedDefaults = false; }
inputs.nix-openclaw.nixosModules.openclaw-gateway
../hosts/phantom-ship.nix
config.flake.nixosModules.dotfiles-rebuild
inputs.home-manager.nixosModules.home-manager
(hmModule {
user = "danny";
homeDirectory = "/home/danny";
stateVersion = "25.11";
})
];
};
};
}