comodoro: add module
This commit is contained in:
parent
194086df82
commit
e0034971f9
11 changed files with 193 additions and 0 deletions
31
modules/programs/comodoro.nix
Normal file
31
modules/programs/comodoro.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue