!dGrjXvKnCwVLevgmzo:matrix.org

Stockholm NixOS meetup group

48 Members
Monthly meetups in Stockholm, Sweden around Nix releated topics(nixos.org)14 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
18 Sep 2025
@lillecarl:matrix.orglillecarl *

https://github.com/Lillecarl/dinix I wrote a little thing that generates dinit (the init system) configuration from Nix (using the module system).

Dinit is VERY light, the overhead is ~4MB RAM and "no CPU". This enables writing OS and init independent "service collections". It can run as pid1 in Linux (but don't try this), pid1 in containers (reaps zombies and such) or random pid in user mode where it's just a process supervisor.

Also works on MacOS (I don't have a Mac machine so I can't verify though). So you could create a service collection with nginx, postgres, whatever and run it from a single nix command. You could even run dinit from a systemd unit if you'd want.

So you can run the same service collection from: Containers, Systemd, commandline and Nix brings the executables 😄

Here's an example nginx module that runs on 8080 and presents "Hello World" https://github.com/Lillecarl/dinix/blob/main/config.nix

Edit:

nix run --impure --expr '(import (builtins.fetchTree{type="git";url="https:
//github.com/lillecarl/dinix.git";}){}).config.out.script'
07:20:26
@lillecarl:matrix.orglillecarl *

https://github.com/Lillecarl/dinix I wrote a little thing that generates dinit (the init system) configuration from Nix (using the module system).

Dinit is VERY light, the overhead is ~4MB RAM and "no CPU". This enables writing OS and init independent "service collections". It can run as pid1 in Linux (but don't try this), pid1 in containers (reaps zombies and such) or random pid in user mode where it's just a process supervisor.

Also works on MacOS (I don't have a Mac machine so I can't verify though). So you could create a service collection with nginx, postgres, whatever and run it from a single nix command. You could even run dinit from a systemd unit if you'd want.

So you can run the same service collection from: Containers, Systemd, commandline and Nix brings the executables 😄

Here's an example nginx module that runs on 8080 and presents "Hello World" https://github.com/Lillecarl/dinix/blob/main/config.nix

Edit:

nix run --impure --expr '(import (builtins.fetchTree{type="git";url="https://github.com/lillecarl/dinix.git";}){}).config.out.script'
07:20:37
@markuskowa:matrix.orgmarkuskowaIf the generation of config files would be reusable (I.e. separated in the module system), we could reuse them for dinix, or container image generation. 09:37:16

Show newer messages


Back to Room ListRoom Version: 10