1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/nixos/modules
aszlig 3d820d5ba1
nixos/taskserver: Refactor module for CA creation
Now the service starts up if only the services.taskserver.enable option
is set to true.

We now also have three systemd services (started in this order):

 * taskserver-init: For creating the necessary data directory and also
                    includes a refecence to the configuration file in
                    the Nix store.
 * taskserver-ca:   Only enabled if none of the server.key, server.cert,
                    server.crl and caCert options are set, so we can
                    allow for certificates that are issued by another
                    CA.
                    This service creates a new CA key+certificate and a
                    server key+certificate and signs the latter using
                    the CA key.
                    The permissions of these keys/certs are set quite
                    strictly to allow only the root user to sign
                    certificates.
 * taskserver:      The main Taskserver service which just starts taskd.

We now also log to stdout and thus to the journal.

Of course, there are still a few problems left to solve, for instance:

 * The CA currently only signs the server certificates, so it's
   only usable for clients if the server doesn't validate client certs
   (which is kinda pointless).
 * Using "taskd <command>" is currently still a bit awkward to use, so
   we need to properly wrap it in environment.systemPackages to set the
   dataDir by default.
 * There are still a few configuration options left to include, for
   example the "trust" option.
 * We might want to introduce an extraConfig option.
 * It might be useful to allow for declarative configuration of
   organisations and users, especially when it comes to creating client
   certificates.
 * The right signal has to be sent for the taskserver service to reload
   properly.
 * Currently the CA and server certificates are created using
   server.host as the common name and doesn't set additional certificate
   information. This could be improved by adding options that explicitly
   set that information.

As for the config file, we might need to patch taskd to allow for
setting not only --data but also a --cfgfile, which then omits the
${dataDir}/config file. We can still use the "include" directive from
the file specified using --cfgfile in order to chainload
${dataDir}/config.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-04-05 18:53:31 +02:00
..
config pulseaudio nixos module: run as systemd user service instead 2016-04-02 23:18:22 +08:00
hardware opengl.extraPackages32: pkgsi686Linux in example 2016-03-26 00:50:56 +11:00
i18n/inputMethod fcitx: show available engines in module description 2016-02-28 07:12:55 -06:00
installer nixos-generate-config.pl: correct path for broadcom-43xx 2016-03-31 23:47:20 +01:00
misc nixos/ids: Rename uid and add gid for "taskd" 2016-04-05 18:53:31 +02:00
profiles Fix the boot-ec2-config test 2016-03-30 22:22:40 +02:00
programs ssh: Fix support for ssh-dss host keys 2016-04-01 15:54:52 +02:00
security fix installer tests #13559 2016-03-12 20:19:40 +00:00
services nixos/taskserver: Refactor module for CA creation 2016-04-05 18:53:31 +02:00
system Revert "initrd: Use modprobe from busybox" 2016-04-01 17:39:09 +02:00
tasks Remove setting non-existent sysctl options 2016-03-15 17:44:30 +01:00
testing test-instrumentation.nix: Only clear $PAGER in the backdoor shell 2016-02-23 11:56:09 +01:00
virtualisation Add 16.03 AMIs 2016-04-05 11:25:12 +02:00
module-list.nix Add taskserver to module-list 2016-04-05 18:53:31 +02:00
rename.nix services.xserver.startGnuPGAgent: remove obsolete NixOS option 2016-03-18 11:06:31 +01:00