···150150 <link linkend="opt-services.prosody-filer.enable">services.prosody-filer</link>.
151151 </para>
152152 </listitem>
153153+ <listitem>
154154+ <para>
155155+ <link xlink:href="https://timetagger.app">timetagger</link>,
156156+ an open source time-tracker with an intuitive user experience
157157+ and powerful reporting.
158158+ <link xlink:href="options.html#opt-services.timetagger.enable">services.timetagger</link>.
159159+ </para>
160160+ </listitem>
153161 </itemizedlist>
154162 </section>
155163 <section xml:id="sec-release-22.05-incompatibilities">
+2
nixos/doc/manual/release-notes/rl-2205.section.md
···46464747- [prosody-filer](https://github.com/ThomasLeister/prosody-filer), a server for handling XMPP HTTP Upload requests. Available at [services.prosody-filer](#opt-services.prosody-filer.enable).
48484949+- [timetagger](https://timetagger.app), an open source time-tracker with an intuitive user experience and powerful reporting. [services.timetagger](options.html#opt-services.timetagger.enable).
5050+4951## Backward Incompatibilities {#sec-release-22.05-incompatibilities}
50525153- `pkgs.ghc` now refers to `pkgs.targetPackages.haskellPackages.ghc`.
+80
nixos/modules/services/web-apps/timetagger.nix
···11+{ config, lib, pkgs, ... }:
22+33+let
44+ inherit (lib) mkEnableOption mkIf mkOption types literalExpression;
55+66+ cfg = config.services.timetagger;
77+in {
88+99+ options = {
1010+ services.timetagger = {
1111+ enable = mkOption {
1212+ type = types.bool;
1313+ default = false;
1414+ description = ''
1515+ Tag your time, get the insight
1616+1717+ <note><para>
1818+ This app does not do authentication.
1919+ You must setup authentication yourself or run it in an environment where
2020+ only allowed users have access.
2121+ </para></note>
2222+ '';
2323+ };
2424+2525+ bindAddr = mkOption {
2626+ description = "Address to bind to.";
2727+ type = types.str;
2828+ default = "127.0.0.1";
2929+ };
3030+3131+ port = mkOption {
3232+ description = "Port to bind to.";
3333+ type = types.port;
3434+ default = 8080;
3535+ };
3636+3737+ package = mkOption {
3838+ description = ''
3939+ Use own package for starting timetagger web application.
4040+4141+ The ${literalExpression ''pkgs.timetagger''} package only provides a
4242+ "run.py" script for the actual package
4343+ ${literalExpression ''pkgs.python3Packages.timetagger''}.
4444+4545+ If you want to provide a "run.py" script for starting timetagger
4646+ yourself, you can do so with this option.
4747+ If you do so, the 'bindAddr' and 'port' options are ignored.
4848+ '';
4949+5050+ default = pkgs.timetagger.override { addr = cfg.bindAddr; port = cfg.port; };
5151+ defaultText = literalExpression ''
5252+ pkgs.timetagger.override {
5353+ addr = ${cfg.bindAddr};
5454+ port = ${cfg.port};
5555+ };
5656+ '';
5757+ type = types.package;
5858+ };
5959+ };
6060+ };
6161+6262+ config = mkIf cfg.enable {
6363+ systemd.services.timetagger = {
6464+ description = "Timetagger service";
6565+ wantedBy = [ "multi-user.target" ];
6666+6767+ serviceConfig = {
6868+ User = "timetagger";
6969+ Group = "timetagger";
7070+ StateDirectory = "timetagger";
7171+7272+ ExecStart = "${cfg.package}/bin/timetagger";
7373+7474+ Restart = "on-failure";
7575+ RestartSec = 1;
7676+ };
7777+ };
7878+ };
7979+}
8080+