Host Options

cells/options/hosts.nix gives every host a typed configuration record under my.hosts.<name>.

Up: options

Down: hosts

What this node does

Each host can declare system architecture, extra branches, host-specific NixOS modules, host-specific Home Manager modules, and hardware modules.

options.my.hosts = mkOption {
  type = types.attrsOf (types.submodule {
    options = {
      system = mkOption { type = types.str; };
      branches = mkOption { type = types.listOf types.str; };
      nixosModules = mkOption { type = types.listOf types.deferredModule; };
      hmModules = mkOption { type = types.listOf types.deferredModule; };
      hardwareModules = mkOption { type = types.listOf types.deferredModule; };
    };
  });
};

Why it exists

Branches should stay reusable. Host files are where reusable branches become one concrete machine.

The host option model lets a host say, “I am x86_64-linux, I want these branches, and I also need these hardware modules.” That keeps hardware and deployment details from leaking into generic leaves.

What to copy

Keep host-specific facts in my.hosts.<name>. Do not put disk UUIDs, cloud bootstrap keys, or machine-only service choices in a generic branch unless every host selecting that branch should inherit them.