[Nix-dev] UI management (Was: Use Haskell for Shell Scripting)

Ertugrul Söylemez ertesx at gmx.de
Tue Feb 10 21:48:11 CET 2015


> Actually, my idea of the core boot sequence is contrary to your goals:
> for core system I think in terms "I want to easily run recovery after
> a USB boot and I want to describe my system in terms of its imperative
> recovery procedure started from initramfs". It is likely that my
> service management will likely also be like that; but I knew you were
> doing something for staring a NixPkgs-like-structured service
> repository and so decided to get by with a minimum set of daemons
> until I can choose to just write service definitions for your approach
> or start my own set of definitions.

You don't have to wait.  If your services are defined in a functional
manner, you won't have much trouble translating them to my concept.
That means that a service is entirely self-contained and receives its
full configuration from its arguments.  It then returns an attribute set
that specifies at the very least the filesystem directories it needs to
access and a non-daemon program that represents the service:

    {config, pkgs}: {
        description = "nginx web server: " + f config;
        init = builtins.toFile "nginx-init.sh" "...";
        mounts = ["/var/www"];
    }

You should assume that the init program runs as PID 1 and that it will
be killed from outside by the usual SIGTERM-wait-SIGKILL sequence.
SIGTERM is only sent to the init program.  If it does not quit fast
enough, the entire process group is killed by SIGKILL.  Also you should
assume that the init program can only access the Nix store and the
directories explicitly mentioned in `mounts`.  It should assume that the
root directory is a read-only RAM-disk and that `/proc`, `/sys` and
`/dev` are already mounted appropriately.


> Hm, want to try out QueryFS?

It looks very interesting.  Currently I'd have little use for it, but if
it's available online, I will certainly try it out when a use case pops
up.


> OK. Well, are you OK with me inviting some other people from the
> beginning? Not sure who of them will join.

Sure, go ahead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150210/04eaffa3/attachment.bin 


More information about the nix-dev mailing list