···566566 })
567567 ];
568568569569+ # Don't edit the docbook xml directly, edit the md and generate it:
570570+ # `pandoc doc.md -t docbook --top-level-division=chapter --extract-media=media -f markdown-smart --lua-filter ../../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua --lua-filter ../../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua > doc.xml`
569571 meta.doc = ./doc.xml;
570572}
+93
nixos/modules/services/misc/taskserver/doc.md
···11+# Taskserver {#module-services-taskserver}
22+33+Taskserver is the server component of
44+[Taskwarrior](https://taskwarrior.org/), a free and
55+open source todo list application.
66+77+*Upstream documentation:* <https://taskwarrior.org/docs/#taskd>
88+99+## Configuration {#module-services-taskserver-configuration}
1010+1111+Taskserver does all of its authentication via TLS using client certificates,
1212+so you either need to roll your own CA or purchase a certificate from a
1313+known CA, which allows creation of client certificates. These certificates
1414+are usually advertised as "server certificates".
1515+1616+So in order to make it easier to handle your own CA, there is a helper tool
1717+called {command}`nixos-taskserver` which manages the custom CA along
1818+with Taskserver organisations, users and groups.
1919+2020+While the client certificates in Taskserver only authenticate whether a user
2121+is allowed to connect, every user has its own UUID which identifies it as an
2222+entity.
2323+2424+With {command}`nixos-taskserver` the client certificate is created
2525+along with the UUID of the user, so it handles all of the credentials needed
2626+in order to setup the Taskwarrior client to work with a Taskserver.
2727+2828+## The nixos-taskserver tool {#module-services-taskserver-nixos-taskserver-tool}
2929+3030+Because Taskserver by default only provides scripts to setup users
3131+imperatively, the {command}`nixos-taskserver` tool is used for
3232+addition and deletion of organisations along with users and groups defined
3333+by [](#opt-services.taskserver.organisations) and as well for
3434+imperative set up.
3535+3636+The tool is designed to not interfere if the command is used to manually set
3737+up some organisations, users or groups.
3838+3939+For example if you add a new organisation using {command}`nixos-taskserver
4040+org add foo`, the organisation is not modified and deleted no
4141+matter what you define in
4242+{option}`services.taskserver.organisations`, even if you're adding
4343+the same organisation in that option.
4444+4545+The tool is modelled to imitate the official {command}`taskd`
4646+command, documentation for each subcommand can be shown by using the
4747+{option}`--help` switch.
4848+4949+## Declarative/automatic CA management {#module-services-taskserver-declarative-ca-management}
5050+5151+Everything is done according to what you specify in the module options,
5252+however in order to set up a Taskwarrior client for synchronisation with a
5353+Taskserver instance, you have to transfer the keys and certificates to the
5454+client machine.
5555+5656+This is done using {command}`nixos-taskserver user export $orgname
5757+$username` which is printing a shell script fragment to stdout
5858+which can either be used verbatim or adjusted to import the user on the
5959+client machine.
6060+6161+For example, let's say you have the following configuration:
6262+```ShellSession
6363+{
6464+ services.taskserver.enable = true;
6565+ services.taskserver.fqdn = "server";
6666+ services.taskserver.listenHost = "::";
6767+ services.taskserver.organisations.my-company.users = [ "alice" ];
6868+}
6969+```
7070+This creates an organisation called `my-company` with the
7171+user `alice`.
7272+7373+Now in order to import the `alice` user to another machine
7474+`alicebox`, all we need to do is something like this:
7575+```ShellSession
7676+$ ssh server nixos-taskserver user export my-company alice | sh
7777+```
7878+Of course, if no SSH daemon is available on the server you can also copy
7979+& paste it directly into a shell.
8080+8181+After this step the user should be set up and you can start synchronising
8282+your tasks for the first time with {command}`task sync init` on
8383+`alicebox`.
8484+8585+Subsequent synchronisation requests merely require the command {command}`task
8686+sync` after that stage.
8787+8888+## Manual CA management {#module-services-taskserver-manual-ca-management}
8989+9090+If you set any options within
9191+[service.taskserver.pki.manual](#opt-services.taskserver.pki.manual.ca.cert).*,
9292+{command}`nixos-taskserver` won't issue certificates, but you can
9393+still use it for adding or removing user accounts.
+120-127
nixos/modules/services/misc/taskserver/doc.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"
22- xmlns:xlink="http://www.w3.org/1999/xlink"
33- version="5.0"
44- xml:id="module-services-taskserver">
55- <title>Taskserver</title>
66- <para>
77- Taskserver is the server component of
88- <link xlink:href="https://taskwarrior.org/">Taskwarrior</link>, a free and
99- open source todo list application.
1010- </para>
1111- <para>
1212- <emphasis>Upstream documentation:</emphasis>
1313- <link xlink:href="https://taskwarrior.org/docs/#taskd"/>
1414- </para>
1515- <section xml:id="module-services-taskserver-configuration">
1616- <title>Configuration</title>
1717-1818- <para>
1919- Taskserver does all of its authentication via TLS using client certificates,
2020- so you either need to roll your own CA or purchase a certificate from a
2121- known CA, which allows creation of client certificates. These certificates
2222- are usually advertised as "server certificates".
2323- </para>
2424-2525- <para>
2626- So in order to make it easier to handle your own CA, there is a helper tool
2727- called <command>nixos-taskserver</command> which manages the custom CA along
2828- with Taskserver organisations, users and groups.
2929- </para>
3030-11+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-taskserver">
22+ <title>Taskserver</title>
313 <para>
3232- While the client certificates in Taskserver only authenticate whether a user
3333- is allowed to connect, every user has its own UUID which identifies it as an
3434- entity.
44+ Taskserver is the server component of
55+ <link xlink:href="https://taskwarrior.org/">Taskwarrior</link>, a
66+ free and open source todo list application.
357 </para>
3636-378 <para>
3838- With <command>nixos-taskserver</command> the client certificate is created
3939- along with the UUID of the user, so it handles all of the credentials needed
4040- in order to setup the Taskwarrior client to work with a Taskserver.
99+ <emphasis>Upstream documentation:</emphasis>
1010+ <link xlink:href="https://taskwarrior.org/docs/#taskd" role="uri">https://taskwarrior.org/docs/#taskd</link>
4111 </para>
4242- </section>
4343- <section xml:id="module-services-taskserver-nixos-taskserver-tool">
4444- <title>The nixos-taskserver tool</title>
4545-4646- <para>
4747- Because Taskserver by default only provides scripts to setup users
4848- imperatively, the <command>nixos-taskserver</command> tool is used for
4949- addition and deletion of organisations along with users and groups defined
5050- by <xref linkend="opt-services.taskserver.organisations"/> and as well for
5151- imperative set up.
5252- </para>
5353-5454- <para>
5555- The tool is designed to not interfere if the command is used to manually set
5656- up some organisations, users or groups.
5757- </para>
5858-5959- <para>
6060- For example if you add a new organisation using <command>nixos-taskserver
6161- org add foo</command>, the organisation is not modified and deleted no
6262- matter what you define in
6363- <option>services.taskserver.organisations</option>, even if you're adding
6464- the same organisation in that option.
6565- </para>
6666-6767- <para>
6868- The tool is modelled to imitate the official <command>taskd</command>
6969- command, documentation for each subcommand can be shown by using the
7070- <option>--help</option> switch.
7171- </para>
7272- </section>
7373- <section xml:id="module-services-taskserver-declarative-ca-management">
7474- <title>Declarative/automatic CA management</title>
7575-7676- <para>
7777- Everything is done according to what you specify in the module options,
7878- however in order to set up a Taskwarrior client for synchronisation with a
7979- Taskserver instance, you have to transfer the keys and certificates to the
8080- client machine.
8181- </para>
8282-8383- <para>
8484- This is done using <command>nixos-taskserver user export $orgname
8585- $username</command> which is printing a shell script fragment to stdout
8686- which can either be used verbatim or adjusted to import the user on the
8787- client machine.
8888- </para>
8989-9090- <para>
9191- For example, let's say you have the following configuration:
9292-<screen>
1212+ <section xml:id="module-services-taskserver-configuration">
1313+ <title>Configuration</title>
1414+ <para>
1515+ Taskserver does all of its authentication via TLS using client
1616+ certificates, so you either need to roll your own CA or purchase a
1717+ certificate from a known CA, which allows creation of client
1818+ certificates. These certificates are usually advertised as
1919+ "server certificates".
2020+ </para>
2121+ <para>
2222+ So in order to make it easier to handle your own CA, there is a
2323+ helper tool called <command>nixos-taskserver</command> which
2424+ manages the custom CA along with Taskserver organisations, users
2525+ and groups.
2626+ </para>
2727+ <para>
2828+ While the client certificates in Taskserver only authenticate
2929+ whether a user is allowed to connect, every user has its own UUID
3030+ which identifies it as an entity.
3131+ </para>
3232+ <para>
3333+ With <command>nixos-taskserver</command> the client certificate is
3434+ created along with the UUID of the user, so it handles all of the
3535+ credentials needed in order to setup the Taskwarrior client to
3636+ work with a Taskserver.
3737+ </para>
3838+ </section>
3939+ <section xml:id="module-services-taskserver-nixos-taskserver-tool">
4040+ <title>The nixos-taskserver tool</title>
4141+ <para>
4242+ Because Taskserver by default only provides scripts to setup users
4343+ imperatively, the <command>nixos-taskserver</command> tool is used
4444+ for addition and deletion of organisations along with users and
4545+ groups defined by
4646+ <xref linkend="opt-services.taskserver.organisations"></xref> and
4747+ as well for imperative set up.
4848+ </para>
4949+ <para>
5050+ The tool is designed to not interfere if the command is used to
5151+ manually set up some organisations, users or groups.
5252+ </para>
5353+ <para>
5454+ For example if you add a new organisation using
5555+ <command>nixos-taskserver org add foo</command>, the organisation
5656+ is not modified and deleted no matter what you define in
5757+ <option>services.taskserver.organisations</option>, even if you're
5858+ adding the same organisation in that option.
5959+ </para>
6060+ <para>
6161+ The tool is modelled to imitate the official
6262+ <command>taskd</command> command, documentation for each
6363+ subcommand can be shown by using the <option>--help</option>
6464+ switch.
6565+ </para>
6666+ </section>
6767+ <section xml:id="module-services-taskserver-declarative-ca-management">
6868+ <title>Declarative/automatic CA management</title>
6969+ <para>
7070+ Everything is done according to what you specify in the module
7171+ options, however in order to set up a Taskwarrior client for
7272+ synchronisation with a Taskserver instance, you have to transfer
7373+ the keys and certificates to the client machine.
7474+ </para>
7575+ <para>
7676+ This is done using
7777+ <command>nixos-taskserver user export $orgname $username</command>
7878+ which is printing a shell script fragment to stdout which can
7979+ either be used verbatim or adjusted to import the user on the
8080+ client machine.
8181+ </para>
8282+ <para>
8383+ For example, let's say you have the following configuration:
8484+ </para>
8585+ <programlisting>
9386{
9487 services.taskserver.enable = true;
9595- services.taskserver.fqdn = "server";
9696- services.taskserver.listenHost = "::";
9797- services.taskserver.organisations.my-company.users = [ "alice" ];
8888+ services.taskserver.fqdn = "server";
8989+ services.taskserver.listenHost = "::";
9090+ services.taskserver.organisations.my-company.users = [ "alice" ];
9891}
9999-</screen>
100100- This creates an organisation called <literal>my-company</literal> with the
101101- user <literal>alice</literal>.
102102- </para>
103103-104104- <para>
105105- Now in order to import the <literal>alice</literal> user to another machine
106106- <literal>alicebox</literal>, all we need to do is something like this:
107107-<screen>
108108-<prompt>$ </prompt>ssh server nixos-taskserver user export my-company alice | sh
109109-</screen>
110110- Of course, if no SSH daemon is available on the server you can also copy
111111- & paste it directly into a shell.
112112- </para>
113113-114114- <para>
115115- After this step the user should be set up and you can start synchronising
116116- your tasks for the first time with <command>task sync init</command> on
117117- <literal>alicebox</literal>.
118118- </para>
119119-120120- <para>
121121- Subsequent synchronisation requests merely require the command <command>task
122122- sync</command> after that stage.
123123- </para>
124124- </section>
125125- <section xml:id="module-services-taskserver-manual-ca-management">
126126- <title>Manual CA management</title>
127127-128128- <para>
129129- If you set any options within
130130- <link linkend="opt-services.taskserver.pki.manual.ca.cert">service.taskserver.pki.manual</link>.*,
131131- <command>nixos-taskserver</command> won't issue certificates, but you can
132132- still use it for adding or removing user accounts.
133133- </para>
134134- </section>
9292+</programlisting>
9393+ <para>
9494+ This creates an organisation called <literal>my-company</literal>
9595+ with the user <literal>alice</literal>.
9696+ </para>
9797+ <para>
9898+ Now in order to import the <literal>alice</literal> user to
9999+ another machine <literal>alicebox</literal>, all we need to do is
100100+ something like this:
101101+ </para>
102102+ <programlisting>
103103+$ ssh server nixos-taskserver user export my-company alice | sh
104104+</programlisting>
105105+ <para>
106106+ Of course, if no SSH daemon is available on the server you can
107107+ also copy & paste it directly into a shell.
108108+ </para>
109109+ <para>
110110+ After this step the user should be set up and you can start
111111+ synchronising your tasks for the first time with
112112+ <command>task sync init</command> on <literal>alicebox</literal>.
113113+ </para>
114114+ <para>
115115+ Subsequent synchronisation requests merely require the command
116116+ <command>task sync</command> after that stage.
117117+ </para>
118118+ </section>
119119+ <section xml:id="module-services-taskserver-manual-ca-management">
120120+ <title>Manual CA management</title>
121121+ <para>
122122+ If you set any options within
123123+ <link linkend="opt-services.taskserver.pki.manual.ca.cert">service.taskserver.pki.manual</link>.*,
124124+ <command>nixos-taskserver</command> won't issue certificates, but
125125+ you can still use it for adding or removing user accounts.
126126+ </para>
127127+ </section>
135128</chapter>