Welcome! Thank you for your interest in the System Manager project. Your contributions are greatly appreciated.
System Manager development requires a Nix installation with the flakes and nix-command features enabled. If you do not have Nix installed, please refer to the Installation Guide.
- Create a fork of the repository
- Clone your fork locally:
git clone git@github.com:<USER>/system-manager.git
- Enter the development environment:
This provides all tools necessary to build and test the repository.
nix develop
- Create an issue for the problem you are trying to solve, if one does not already exist.
- Create a pull request to close the issue.
Before creating a new issue, please search existing issues to ensure the problem is not already being tracked.
Important: Please ensure an issue exists for the problem you are fixing before opening a pull request.
- Create a working branch targeting the issue number:
git checkout -b <USER>/123
- Add, commit, and push your changes:
git add -A git commit -m "fix: Fixes ..." git push origin <USER>/123
- Open a pull request targeting the
mainbranch. - Add a few sentences describing your changes and use closing keywords to automatically close the related issue.
System Manager officially supports Ubuntu and Debian. Promoting a new distribution to officially-supported status means it is exercised by CI on every PR and a regression in it blocks the build.
If you just want to run System Manager on an untested distribution without contributing it back, initialize a flake and disable the OS check by setting system-manager.allowAnyDistro = true in your configuration module:
{
config.system-manager.allowAnyDistro = true;
}Then iterate with nix run 'github:numtide/system-manager' -- switch --flake '.' and debug any errors using the FAQ, GitHub issues, or a discussion.
Once the distribution is stable for your use case, consider upstreaming it via the steps below.
Adding a distribution touches four areas: the OS allow-list, the container test driver, the VM test driver, and the documentation.
1. Add the distribution ID to the OS allow-list.
Edit nix/modules/default.nix and append the /etc/os-release ID value to the supportedIds list inside the osVersion pre-activation assertion.
The check is bypassed when users set system-manager.allowAnyDistro = true, but the allow-list is what controls the default.
2. Add a container test entry.
Container tests live under testFlake/container-tests/ and are parameterized over every distribution declared in lib/container-test-driver/distros.nix.
Adding a new entry there causes all existing tests to automatically generate a container-<distro>-* variant via forEachDistro.
The entry must supply systems, a rootfs derivation built by lib.container-test-driver.make-rootfs.buildRootfs, and a maskableService (a systemd unit that test scripts may mask, typically unattended-upgrades.service or equivalent).
buildRootfs accepts three upstream image formats via cloudImgFormat, and the right choice depends on what the distribution publishes:
"tar"(default) consumes a flat rootfs tarball such as Ubuntu's*-server-cloudimg-amd64-root.tar.xz. This is the simplest path, has no architecture restrictions, and should be preferred whenever the distribution ships a rootfs tarball."disk-tarball"consumes a.tar.xzthat wraps a raw disk image, such as Debian's*-genericcloud-*.tar.xz. It unpacks the outer tarball, locates the root partition withsfdisk -J+jq, extracts it withdd, and dumps the ext4 filesystem into$outviadebugfs -R "rdump / $out". All required tools (util-linux,e2fsprogs,jq) are cross-architecture in nixpkgs, so this works on bothx86_64-linuxandaarch64-linux.excludePatternsare applied as a post-extraction prune pass rather than as tar--excludeflags. Note: this currently assumes the root filesystem is ext4; a btrfs-backed rootfs (such as Fedora Workstation) would need abtrfs restore-based variant added alongside."qcow2"extracts the rootfs from a qcow2 cloud disk image usingguestfish tar-out. It pulls inlibguestfs-with-appliance, whoselibguestfs-appliancesubpackage is markedmeta.platforms = [ "i686-linux" "x86_64-linux" ]in nixpkgs, so entries using this format must restrictsystemstox86_64-linux. Use only as a last resort, when the distribution publishes neither a rootfs tarball nor a disk-in-tarball variant.
Pin a specific dated build directory upstream rather than latest/ and obtain the SHA256 with nix-prefetch-url. URL and hash go in lib/container-test-driver/images.json; distros.nix reads them automatically.
Reuse the existing excludePatterns (which strip container-incompatible systemd units) and extraDirs (per-package-manager directories like var/lib/apt/lists/partial) as a starting point and trim or extend them based on the first build.
3. Add a VM test entry.
VM tests live under testFlake/vm-tests/ and iterate over distributions exposed by nix-vm-test.
Edit the distros attrset in testFlake/vm-tests/default.nix to add a key matching the nix-vm-test distribution name (ubuntu, debian, fedora, rocky).
Each entry takes a filter predicate that selects which versions to exercise — use it to skip versions you do not want in the matrix.
If nix-vm-test does not yet support the distribution, support must be added there first.
4. Run the test matrix and triage failures.
Build the new check attributes via nix build .#checks.x86_64-linux.container-<distro>-* and vm-<distro>-*-* and triage any failures.
Prefer fixing tests to be distribution-agnostic over skipping them.
5. Update documentation.
The user-facing platform statement lives in docs/site/reference/supported-platforms.md, with secondary mentions in README.md, docs/site/how-to/install.md, docs/site/tutorials/getting-started.md, and docs/site/how-to/test-configuration.md.
Mention the new distribution alongside the existing supported ones.
There is currently no release plan that follows nixpkgs releases, but ad-hoc releases are possible. Here's how to create a release branch for a specific nixpkgs version (e.g., nixpkgs-24.05):
-
Check that a release branch for the required version does not already exist.
-
Fork and clone the repository, then create a new branch:
git checkout -b release-24.05
-
Update the nixpkgs ref in
flake.nix:- inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/24.05";
-
Update the flake lock:
nix flake update nixpkgs
-
Update
Cargo.tomlwith version information:[package] name = "system_manager" - version = "0.1.0" + version = "0.1.0+nixpkgs-24.05" + rust-version = "1.77"
-
Regenerate the Cargo lock:
cargo generate-lockfile
-
Ensure flake checks pass:
nix flake check --keep-going -L
Note: There may be breaking changes between nixpkgs versions requiring additional debugging.
-
Reference the release branch in your flake:
{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/24.05"; system-manager = { type = "github"; owner = "numtide"; repo = "system-manager"; ref = "release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; }
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and community support
- Element Chat - Real-time chat with the Numtide team