2023-04-14 21:41:51 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.comodoro;
|
|
|
|
tomlFormat = pkgs.formats.toml { };
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = with lib.hm.maintainers; [ soywod ];
|
|
|
|
|
|
|
|
options.programs.comodoro = {
|
|
|
|
enable = lib.mkEnableOption "Comodoro, a CLI to manage your time";
|
|
|
|
|
2023-07-01 09:41:32 +00:00
|
|
|
package = lib.mkPackageOptionMD pkgs "comodoro" { };
|
2023-04-14 21:41:51 +00:00
|
|
|
|
|
|
|
settings = lib.mkOption {
|
|
|
|
type = lib.types.submodule { freeformType = tomlFormat.type; };
|
|
|
|
default = { };
|
|
|
|
description = ''
|
|
|
|
Comodoro configuration.
|
|
|
|
See <link xlink:href="https://pimalaya.org/comodoro/cli/configuration/"/> for supported values.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home.packages = [ cfg.package ];
|
|
|
|
|
|
|
|
xdg.configFile."comodoro/config.toml".source =
|
|
|
|
tomlFormat.generate "comodoro-config.toml" cfg.settings;
|
|
|
|
};
|
|
|
|
}
|