Skip to content

feat(system-manager): activate the homes and hjem configurations declared inside a machine - #102

Merged
clhodapp merged 2 commits into
feat/topology-kubenix-nixidyfrom
feat/system-manager-children
Oct 18, 2026
Merged

clhodapp merged 2 commits into
feat/topology-kubenix-nixidyfrom
feat/system-manager-children

Conversation

@clhodapp

@clhodapp clhodapp commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

A system-manager configuration can now be the parent of the configurations declared inside it, the way a NixOS or darwin machine is. system-manager switch applies the homes and hjem configurations declared inside the machine.

Stacked on #101.

What changes

  • modules/systemManager/default is the new default system-manager module. A system-manager configuration imports it unless it passes moduleImports. It imports two modules and sets caisson.forChildren:
    • modules/systemManager/home-manager-activation and modules/systemManager/hjem-activation link to the NixOS modules of the same names. system-manager declares users.users and the systemd options. It starts the units wanted by multi-user.target with system-manager.target, so the NixOS units work unchanged.
    • caisson.forChildren gives each home and each hjem configuration the module system-manager-parent. That module is a link to nixos-parent, and it sets the home directory from the account the machine declares in users.users.
  • The two NixOS activation modules import the core module of the class they are evaluated in, chosen from the manifest. The hjem module writes system.extraDependencies only where that option exists, and system-manager has no such option.
  • Both nixos-parent modules read the nearest NixOS or system-manager configuration above them.
  • system-manager counts as a machine in three places:
    • home names: a home inside machine box is published as homeConfigurations."probe@box";
    • the osConfig and utils a hjem configuration receives;
    • the check that leaves out configurations an inner machine activates. The darwin modules make the same check.
  • The assertion messages say "this machine" rather than "this NixOS configuration".

Testing

  • The new pinned-world test systemManagerActivatesWhatIsDeclaredInside declares a home and a hjem configuration inside a system-manager machine. It checks the home directories, the units home-manager-probe and hjem-activate@, the hjem packages in users.users.probe.packages, and the published home name.
  • nix flake check passes, eval-weight gate included.
  • nix flake check --no-build passes in all 17 workspace consumers, with both the flake's caisson input and the tests/dependencies caisson pin pointed at this branch. ch-system-manager ran on test/system-manager-configurations (refactor: nixos-minimal as its own integration over the nixos class #15).

Docs: nix-caisson/nix-caisson.github.io, branch docs/system-manager-parent.

🤖 Generated with Claude Code

clhodapp and others added 2 commits October 18, 2026 10:59
…ared inside a machine

A system-manager configuration now acts as the parent of the
configurations declared inside it, as a NixOS or darwin machine does.
Its new registered `default` module imports:

- `home-manager-activation` and `hjem-activation`, the NixOS modules
  registered a second time for the `systemManager` class. They import
  the core module of the class they are evaluated in, and the hjem
  module keeps extra dependencies only where the class declares
  `system.extraDependencies`.
- `caisson.forChildren` settings that give homes and hjem
  configurations the `system-manager-parent` module, the `nixos-parent`
  module under a second name, which reads the nearest NixOS or
  system-manager machine.

system-manager counts as a machine for naming homes (`user@machine`),
for the `osConfig` and `utils` a hjem configuration receives, and for
the check that leaves out what an inner machine activates. A
pinned-world test declares a home and a hjem configuration inside a
system-manager machine and checks the units, the packages and the
published home name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clhodapp
clhodapp force-pushed the feat/system-manager-children branch from 1825e3c to 0522d1c Compare October 18, 2026 18:04
@clhodapp clhodapp changed the title feat(system-manager): activate the homes, hjem and nvf configurations declared inside a machine feat(system-manager): activate the homes and hjem configurations declared inside a machine Oct 18, 2026
@clhodapp
clhodapp merged commit 825a72c into main Oct 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant