modules/calendar: add khal calendar to the modules

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-21 19:10:20 +03:00
parent 9f17dba58d
commit d380f10983
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
3 changed files with 29 additions and 5 deletions

View file

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
let
cfg = config.local.programs.calendar;
mkCalOpts = name: {
enable = lib.mkEnableOption name;
package = lib.mkPackageOption pkgs name { };
};
in
{
options.local.programs.calendar = {
khal = mkCalOpts "khal";
};
config.home.packages =
lib.optional cfg.khal.enable cfg.khal.package;
}

View file

@ -3,6 +3,7 @@
{
imports = [
./aerc.nix
./calendar.nix
./communication.nix
./dev-tools.nix
./flameshot.nix

View file

@ -2,19 +2,24 @@
let
cfg = config.local.programs.share-files;
mkShareFileOpts = name: {
enable = lib.mkEnableOption name;
package = lib.mkPackageOption pkgs name { };
};
in
{
options.local.programs.share-files = with lib; {
onionshare.enable = mkEnableOption "onionshare";
croc.enable = mkEnableOption "croc";
options.local.programs.share-files = {
onionshare.enable = mkShareFileOpts "onionshare-gui";
croc.enable = mkShareFileOpts "croc";
};
config.home.packages =
# OnionShare is an open-source tool that lets you securely and anonymously share files,
# host websites, and chat with friends using the Tor network.
lib.optional cfg.onionshare.enable pkgs.onionshare-gui
lib.optional cfg.onionshare.enable cfg.onionshare.package
# Easily and securely send things from one computer to another
++ lib.optional cfg.croc.enable pkgs.croc;
++ lib.optional cfg.croc.enable cfg.croc.package;
}