1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 10:49:44 +01:00
home-manager/modules/programs/comodoro.nix

32 lines
825 B
Nix
Raw Normal View History

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 = {
enable = lib.mkEnableOption "Comodoro, a CLI to manage your time";
package = lib.mkPackageOption pkgs "comodoro" { };
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;
};
}