Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.services.jotta-cli;
|
|
in
|
|
{
|
|
options = {
|
|
services.jotta-cli = {
|
|
|
|
enable = lib.mkEnableOption "Jottacloud Command-line Tool";
|
|
|
|
options = lib.mkOption {
|
|
default = [
|
|
"stdoutlog"
|
|
"datadir"
|
|
"%h/.jottad/"
|
|
];
|
|
example = [ ];
|
|
type = with lib.types; listOf str;
|
|
description = "Command-line options passed to jottad.";
|
|
};
|
|
|
|
package = lib.mkPackageOption pkgs "jotta-cli" { };
|
|
};
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.user.services.jottad = {
|
|
|
|
description = "Jottacloud Command-line Tool daemon";
|
|
|
|
serviceConfig = {
|
|
Type = "notify";
|
|
EnvironmentFile = "-%h/.config/jotta-cli/jotta-cli.env";
|
|
ExecStart = "${lib.getExe' cfg.package "jottad"} ${lib.concatStringsSep " " cfg.options}";
|
|
Restart = "on-failure";
|
|
};
|
|
|
|
wantedBy = [ "default.target" ];
|
|
wants = [ "network-online.target" ];
|
|
after = [ "network-online.target" ];
|
|
};
|
|
environment.systemPackages = [ pkgs.jotta-cli ];
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ evenbrenden ];
|
|
meta.doc = ./jotta-cli.md;
|
|
}
|