khal: add package option
This commit is contained in:
parent
7e769959e8
commit
939375b396
|
@ -168,6 +168,8 @@ in {
|
||||||
options.programs.khal = {
|
options.programs.khal = {
|
||||||
enable = mkEnableOption "khal, a CLI calendar application";
|
enable = mkEnableOption "khal, a CLI calendar application";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "khal" { };
|
||||||
|
|
||||||
locale = mkOption {
|
locale = mkOption {
|
||||||
type = lib.types.submodule { options = localeOptions; };
|
type = lib.types.submodule { options = localeOptions; };
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -197,7 +199,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.khal ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."khal/config".text = concatStringsSep "\n" ([ "[calendars]" ]
|
xdg.configFile."khal/config".text = concatStringsSep "\n" ([ "[calendars]" ]
|
||||||
++ mapAttrsToList genCalendarStr khalAccounts ++ [
|
++ mapAttrsToList genCalendarStr khalAccounts ++ [
|
||||||
|
|
Loading…
Reference in a new issue