fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert HelgessonMerge PR #421575790441

master
806 B31 linesraw
1{ config, lib, pkgs, ... }:
2
3let
4  cfg = config.programs.comodoro;
5  tomlFormat = pkgs.formats.toml { };
6
7in {
8  meta.maintainers = with lib.hm.maintainers; [ soywod ];
9
10  options.programs.comodoro = {
11    enable = lib.mkEnableOption "Comodoro, a CLI to manage your time";
12
13    package = lib.mkPackageOption pkgs "comodoro" { };
14
15    settings = lib.mkOption {
16      type = lib.types.submodule { freeformType = tomlFormat.type; };
17      default = { };
18      description = ''
19        Comodoro configuration.
20        See <https://pimalaya.org/comodoro/cli/configuration/> for supported values.
21      '';
22    };
23  };
24
25  config = lib.mkIf cfg.enable {
26    home.packages = [ cfg.package ];
27
28    xdg.configFile."comodoro/config.toml".source =
29      tomlFormat.generate "comodoro-config.toml" cfg.settings;
30  };
31}