Skip to content

Enable system manager#2063

Open
jfroche wants to merge 10 commits intodevelopfrom
system-manager-base
Open

Enable system manager#2063
jfroche wants to merge 10 commits intodevelopfrom
system-manager-base

Conversation

@jfroche
Copy link
Collaborator

@jfroche jfroche commented Feb 23, 2026

  • Create default system manager configuration

  • chores: add nix run .#check-system-module to github actions workflows

  • feat: replace Docker-based system-manager tests with container test framework

Switch from building Docker images and running pytest+testinfra externally to using system-manager's built-in makeContainerTest API backed by systemd-nspawn. The test is now a Nix check derivation that runs inside the build sandbox.

It requires auto-allocating UIDs in the ephemeral Nix installation, which is now enabled by default in the GitHub Action.

Splited from #1882
Rebased from #2010

Testing: The test uses system-manager's makeContainerTest API which spins up a lightweight systemd-nspawn container (not a full VM). Inside the container it waits for the system to reach multi-user
target, then activates the system-manager configuration and waits for system-manager.target to come up. Once active, it verifies that the /etc/system-manager-genesis file was created by
checking that it exists, has mode 0644, and is owned by root:root. This proves the full system-manager pipeline works end to end, from Nix module definition through to file deployment inside a
running system.

@jfroche jfroche force-pushed the system-manager-base branch from 4d4ff65 to 293c344 Compare February 23, 2026 14:28
@blacksmith-sh

This comment has been minimized.

@jfroche jfroche force-pushed the system-manager-base branch 3 times, most recently from e9e7d85 to ee5fe34 Compare February 27, 2026 10:13
@picnoir picnoir force-pushed the system-manager-base branch from 6e9dd1f to ee5fe34 Compare February 27, 2026 17:24
@jfroche jfroche marked this pull request as ready for review March 2, 2026 11:01
@jfroche jfroche requested review from a team as code owners March 2, 2026 11:01
jfroche and others added 8 commits March 13, 2026 10:11
* Create default system manager configuration

* chores: add nix run .#check-system-module to github actions workflows

* feat: replace Docker-based system-manager tests with container test framework

Switch from building Docker images and running pytest+testinfra externally
to using system-manager's built-in makeContainerTest API backed by
systemd-nspawn. The test is now a Nix check derivation that runs inside
the build sandbox.

It requires auto-allocating UIDs in the ephemeral Nix installation,
which is now enabled by default in the GitHub Action.

Rebased from #2010

Co-authored-by: Yvan Sraka <yvan@sraka.xyz>
system-manager's userborn service rewrites /etc/passwd entries:
- root shell: /bin/bash -> /run/system-manager/sw/bin/bash
- nobody shell: /usr/sbin/nologin -> /run/system-manager/sw/bin/nologin
The check should be part of the regular nix-build workflow
Enabling the nginx service in the system configuration was a good start,
but it had implications for the test suite verifying that the AMI was
correctly configured.

We change the configuration to set up a basic ssh config file that
matches the expected configuration for the AMI, and update the tests to
verify that the file is created with the correct content and
permissions.
@samrose samrose force-pushed the system-manager-base branch from fa57ba5 to 9fb8bdf Compare March 13, 2026 14:36
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.

2 participants