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

Michael Raskin 7c6f434c at mail.ru
Tue Feb 10 22:10:23 CET 2015


>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.

The config is not yet separated from code in many places.

>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. Pity. My everlasting recovery model means that don't want to assume
existence of any functionality in PID1 (there are many almost-NOP
options: busybox, sinit, container-targeted trivial init, etc.)

So the question is whether the script and config file generation part
can be shared; the unifying part I want is more like nix-rehash than 
any single init setup.

>> 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.

http://mtn-host.prjek.net/projects/cl-fuse/ 

there is a dumb github mirror if you wish.

I have some file tagging queries among examples. The query parsing
plugins have to produce Lisp (and are simpler to implement in Lisp),
but if you need some kind of queries I might like your idea and just
implement it.

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

OK, thanks.





More information about the nix-dev mailing list