radicale: Add extraArgs option to assist in data migration

This commit is contained in:
Aneesh Agrawal 2017-09-17 22:11:23 -07:00
parent 018a5ae2f4
commit fcd590d116
2 changed files with 12 additions and 2 deletions

View file

@ -107,7 +107,7 @@ rmdir /var/lib/ipfs/.ipfs
The <literal>mysql</literal> default <literal>dataDir</literal> has changed from <literal>/var/mysql</literal> to <literal>/var/lib/mysql</literal>.
</para>
<para>
Radicale's default package has changed from 1.x to 2.x. Instructions to migrate can be found <link xlink:href="http://radicale.org/1to2/"> here </link>. It is also possible to use the newer version by setting the <literal>package</literal> to <literal>radicale2</literal>, which is done automatically when <literal>stateVersion</literal> is 17.09 or higher.
Radicale's default package has changed from 1.x to 2.x. Instructions to migrate can be found <link xlink:href="http://radicale.org/1to2/"> here </link>. It is also possible to use the newer version by setting the <literal>package</literal> to <literal>radicale2</literal>, which is done automatically when <literal>stateVersion</literal> is 17.09 or higher. The <literal>extraArgs</literal> option has been added to allow passing the data migration arguments specified in the instructions.
</para>
</listitem>
<listitem>

View file

@ -48,6 +48,12 @@ in
configuration file.
'';
};
services.radicale.extraArgs = mkOption {
type = types.listOf types.string;
default = [];
description = "Extra arguments passed to the Radicale daemon.";
};
};
config = mkIf cfg.enable {
@ -71,7 +77,11 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/radicale -C ${confFile} -f";
ExecStart = concatStringsSep " " ([
"${cfg.package}/bin/radicale" "-C" confFile
] ++ (
map escapeShellArg cfg.extraArgs
));
User = "radicale";
Group = "radicale";
};