About this project
Graft is an early-alpha project for declaring small container workloads in typed TOML and having Nix, Podman Quadlet, and systemd realise them. The documented flow is: TOML intent -> validated resolved JSON -> Nix-built rootfs -> Quadlet .container file -> systemd service -> Podman container. It aims to avoid a Dockerfile, runtime package installation, and hand-written Quadlet files by validating supported workload concepts rather than accepting arbitrary Podman, Quadlet, systemd, or Nix fragments.
The repository describes a rootfs-store backend for two scopes: NixOS system/rootful containers and Home Manager user-manager containers. Reported supported features include packages, argv commands, identity, working directory, environment, long-running services, finite jobs, setup jobs, explicit startup, typed workload dependencies, selected container networking, read-only-by-default binds, managed volumes, bounded tmpfs mounts, qualified CDI resource references, typed hardening controls, generated schema validation, and fail-closed rejection of reserved fields. The documentation separates accepted TOML in a configuration reference from an authoritative capability status covering current, planned, deferred, and forbidden behaviour.
Security defaults include a read-only rootfs, dropped runtime capabilities, and no-new-privileges, with relaxations kept explicit. Graft adds no default autostart or restart policy, and it does not silently configure Podman, rootless overlay support, systemd user linger, accounts, firewall rules, or DNS policy. Containers share the host kernel and are not presented as a VM-equivalent security boundary. The current backend exposes only each workload's realised Nix runtime closure through mandatory read-only store mounts, with no complete-store fallback.
The README positions Graft for small Nix-native services and development workloads that benefit from reviewable TOML and systemd ownership. It lists alternatives for different needs: direct Quadlet for full upstream option coverage, Compose tooling for OCI/Compose workflows, or a VM boundary when workloads must not share the host kernel. Quickstarts, roadmap, vision, security policy, contribution guide, and development checks are linked, and the project is Apache-2.0 licensed.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.