8 cfg = config.services.jotta-cli;
12 services.jotta-cli = {
14 enable = lib.mkEnableOption "Jottacloud Command-line Tool";
16 options = lib.mkOption {
23 type = with lib.types; listOf str;
24 description = "Command-line options passed to jottad.";
27 package = lib.mkPackageOption pkgs "jotta-cli" { };
30 config = lib.mkIf cfg.enable {
31 systemd.user.services.jottad = {
33 description = "Jottacloud Command-line Tool daemon";
37 EnvironmentFile = "-%h/.config/jotta-cli/jotta-cli.env";
38 ExecStart = "${lib.getExe' cfg.package "jottad"} ${lib.concatStringsSep " " cfg.options}";
39 Restart = "on-failure";
42 wantedBy = [ "default.target" ];
43 wants = [ "network-online.target" ];
44 after = [ "network-online.target" ];
46 environment.systemPackages = [ pkgs.jotta-cli ];
49 meta.maintainers = with lib.maintainers; [ evenbrenden ];
50 meta.doc = ./jotta-cli.md;