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