Compose2nix – NixOS and Docker Compose made easy
Hi! compose2nix is a CLI tool that automatically converts your Docker Compose project into a NixOS configuration[1]. * Why does this even exist? Well, NixOS is a Linux distro that is configured using Nix (the language). However, Compose adds a configuration layer on top that is opaque to Nix, which means you lose out on some of the "magic" of NixOS. compose2nix solves this by "lifting" Compose functionality into native Nix/NixOS constructs, which results in a more native integration with NixOS. In addition, this tool unlocks two primary use-cases: 1. You can run existing non-trivial…
What it does
In the maker’s words, at launch
Hi! compose2nix is a CLI tool that automatically converts your Docker Compose project into a NixOS configuration[1]. * Why does this even exist? Well, NixOS is a Linux distro that is configured using Nix (the language). However, Compose adds a configuration layer on top that is opaque to Nix, which means you lose out on some of the "magic" of NixOS. compose2nix solves this by "lifting" Compose functionality into native Nix/NixOS constructs, which results in a more native integration with NixOS. In addition, this tool unlocks two primary use-cases: 1. You can run existing non-trivial applications - e.g., Immich - without worrying if they're natively packaged for NixOS. 2. You can bring your existing Compose stack over to NixOS and run it as-is without having to rewrite it in Nix. The auto-generated config can either act as a starting point, or you can keep your Compose file as the source of truth and re-generate it as you go. * How does it work? compose2nix maps Compose constructs into systemd services that run native Docker/Podman commands. Under the hood, the tool utilizes the same Compose library[2] used by the Docker CLI, so you also get Compose syntax checking "for free". In a way, it's a thin re-implementation of the Docker Compose CLI. One thing to point out is that compose2nix aims to natively support both Podman and Docker as container runtimes. The README has a bit more detail. There's also a (somewhat rambly) video that explains what the project is about and includes a short demo of the tool: https://www.youtube.com/watch?v=hCAFyzJ81Pg Oh, and please feel free to shoot me any questions or feedback (good or bad)! [1]: In case it's your first time hearing about NixOS, here is a good overview: https://zero-to-nix.com/concepts/nixos [2]: https://github.com/compose-spec/compose-go
Does the same job
all alternatives →- GAGenerate a NixOS config from a Docker Compose project2023 · github.com · ▲9

- GFGo from Docker-Compose to Kubernetes with a simple tool2017 · kompose.io · ▲249
- DDDCPM – Docker Compose Package Manager2020 · ▲59
Hey y'all, I've been using docker compose a lot in my local network, and managing setup between machines is a bit of a pain in the ass for me. I wanted an easy way to share complex configurations. At the moment most docker compose package management is done by adding a docker-compose.yml to your repo, adding a bunch of setup instructions, and hoping they are well followed. This didn't feel like a smart way to go about it to me. I wanted to create a way to create a complex package, say a series of related or linked services, and provide some meaningful way to have users install it. That's why…

- PDPNGR – Docker-compose for a Postgres-Nginx-Golang-React stack2019 · github.com · ▲138
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, October 2024
the whole month →


Softr for Notion▲925Turn Notion databases into portals & apps with no code
Dev tools · 2024 · softr.io

One inbox for all your work discussions
Work · 2024 · generalcollaboration.com