nixpkgs/nixos/modules/services/misc
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
..
apache-kafka.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
autofs.nix autofs service: clear lockfile before start 2016-03-14 01:02:40 +03:00
bepasty.nix services.bepasty: buildEnv for creating PYTHONPATH 2016-02-28 01:35:56 +01:00
calibre-server.nix calibre-server service: add type to libraryDir option 2015-10-31 14:21:56 -07:00
canto-daemon.nix canto-daemon: Fix typo and remove TimeoutStopSec 2015-02-08 14:16:17 +00:00
cfdyndns.nix cfdyndns: init at 0.0.1 2016-02-15 12:54:04 -08:00
cgminer.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
confd.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
cpuminer-cryptonight.nix cpuminer-cryptonight: new service module 2014-09-22 13:37:47 -04:00
defaultUnicornConfig.rb fixup! gitlab: 8.0.5 -> 8.5.0, service improvements 2016-02-26 08:31:20 +01:00
devmon.nix devmon: Non-root user, set PATH, require udisks2 2015-11-18 11:30:08 +00:00
dictd.nix jobs -> systemd.services 2016-01-07 06:39:06 +00:00
disnix.nix disnix: propagate ejabberd username to the activation module 2016-01-16 18:08:07 +00:00
docker-registry.nix nixos/docker-registry: rename 'host' to 'listenAddress' 2015-12-24 00:06:40 +01:00
etcd.nix etcd: 2.1.2 -> 2.3.0 2016-03-26 22:47:15 -04:00
felix.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
folding-at-home.nix jobs -> systemd.services 2016-01-07 06:39:06 +00:00
gammu-smsd.nix gammu-smsd service: init 2016-02-15 00:26:41 +03:00
gitit.nix nixos: gitit, wrong type restriction redacted 2016-02-12 07:00:37 +01:00
gitlab.nix gitlab service: Remove emailFrom option 2016-03-17 04:16:25 +01:00
gitlab.xml gitlab: Add documentation 2016-02-26 08:56:39 +01:00
gitolite.nix nixos: Replace pkgs.openssh with config.programs.ssh.package 2015-06-26 17:09:58 -07:00
gpsd.nix types.uniq types.int -> types.int 2015-06-15 18:11:32 +02:00
ihaskell.nix Revert "Add the tool "nixos-typecheck" that can check an option declaration to:" 2016-03-01 20:52:06 +01:00
mantisbt.nix mantisbt: fix typo in documentation 2016-03-12 07:48:36 -06:00
mathics.nix nixos/mathics: New service and test 2016-01-02 14:34:55 -08:00
matrix-synapse-log_config.yaml matrix-synapse: init at 0.12.0 2016-01-15 15:17:14 +01:00
matrix-synapse.nix nixos: Provide a defaultText for type = package 2016-02-17 21:12:24 +01:00
mbpfan.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
mediatomb.nix Allow setting mediatomb interface 2015-06-13 15:16:28 +00:00
mesos-master.nix Some more type cleanup 2015-06-15 18:18:46 +02:00
mesos-slave.nix Some more type cleanup 2015-06-15 18:18:46 +02:00
mwlib.nix mwlib uses pdftk to create books 2015-06-08 08:35:12 +00:00
nix-daemon.nix nix.useChroot: allow 'relaxed' as a value 2016-03-25 12:50:39 +00:00
nix-gc.nix nix-gc.nix: Revert 'prefer "nix-store" over "nix-collect-garbage" because the latter supports "--max-freed"' 2015-09-04 11:51:01 +02:00
nix-ssh-serve.nix
nixos-manual.nix Revert "Add the tool "nixos-typecheck" that can check an option declaration to:" 2016-03-01 20:52:06 +01:00
octoprint.nix octoprint service: add extraConfig 2016-03-12 18:52:16 +03:00
parsoid.nix nixos/parsoid: use nodejs 0.10 2015-10-22 14:34:02 +03:00
phd.nix Fix forgotten unit entry 2014-09-03 15:47:53 +04:00
plex.nix nixos: Provide a defaultText for type = package 2016-02-17 21:12:24 +01:00
redmine.nix nixos/redmine: improve assert message 2015-12-08 22:52:02 +01:00
ripple-data-api.nix fix argument in mkEnableOption 2015-06-21 18:21:21 +03:00
ripple-rest.nix fix argument in mkEnableOption 2015-06-21 18:21:21 +03:00
rippled.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
rogue.nix nixos/rogue: Set WorkingDirectory to /tmp 2015-07-22 16:08:17 +03:00
siproxd.nix siproxd: initial service expression 2014-08-19 10:19:52 -04:00
spice-vdagentd.nix spice-vdagentd service : initial at 0.16.0 2016-03-05 07:56:47 +10:00
subsonic.nix nixos manuals: bring back package references 2016-02-03 14:47:14 +01:00
sundtek.nix sundtek: 2015-12-12 -> 2016-01-26 + service change 2016-01-30 20:08:52 +01:00
svnserve.nix jobs -> systemd.services 2016-01-07 06:39:06 +00:00
synergy.nix nixos/synergy: Restart services on failure. 2015-10-13 04:42:39 +02:00
taskserver.nix nixos/taskserver: Refactor module for CA creation 2016-04-05 18:53:31 +02:00
uhub.nix uhub: initial service expression 2014-09-01 10:53:19 +04:00
zookeeper.nix Some more type cleanup 2015-06-15 18:18:46 +02:00