3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/services
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
..
amqp nixos manuals: bring back package references 2016-02-03 14:47:14 +01:00
audio Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
backup Merge pull request #14405 from jerith666/crashplan-46-r2 2016-04-02 22:06:40 +00:00
cluster Fix fleet certfile argument, fixes #11794 2015-12-22 01:24:47 +01:00
computing nixos: Provide a defaultText for type = package 2016-02-17 21:12:24 +01:00
continuous-integration/jenkins Configure a default trust store for openssl 2016-02-03 12:42:01 +01:00
databases postgresql: Bump default version to 9.5 2016-02-12 13:20:11 +01:00
desktops
games jobs -> systemd.services 2016-01-07 06:39:06 +00:00
hardware sane module: add more documentation 2016-02-25 19:36:46 +00:00
logging awstats: init at 7.4, including a simple service 2016-03-11 10:37:06 +01:00
mail dspam service: run after postgresql to prevent segfaults 2016-03-27 19:23:01 +03:00
misc nixos/taskserver: Refactor module for CA creation 2016-04-05 18:53:31 +02:00
monitoring graphite: fix carbonCache graphiteWeb graphiteApi 2016-03-12 02:02:04 +01:00
network-filesystems services: Add Tahoe-LAFS service. 2016-03-31 14:01:09 -07:00
networking mfi: init at 2.1.11 2016-04-01 02:45:11 -07:00
printing cups service: fix gutenprint update when there's no printers 2016-03-15 21:46:33 +03:00
scheduling jobs -> systemd.services 2016-01-07 06:39:06 +00:00
search elasticsearch2: init at 2.2.0 2016-02-13 15:03:09 +00:00
security clamav: Use freshclam.conf defined by clamav-updater module if enabled 2016-03-04 02:26:44 +01:00
system dbus nixos module: add units for systemd user session 2016-04-02 23:11:57 +08:00
torrent nixos.transmission: whitelist lz4 in AppArmor rules 2016-03-07 21:01:55 +01:00
ttys Merge pull request #10996 from oxij/nixos-label 2016-01-09 20:52:08 +03:00
web-apps pump.io service: init 2015-12-06 13:35:21 +00:00
web-servers uwsgi service: use python.buildEnv, fix PATH 2016-03-27 19:23:01 +03:00
x11 xserver service: add glamoregl for intel drivers 2016-03-29 18:52:04 +03:00