mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 23:35:36 +00:00
38 lines
822 B
Nix
38 lines
822 B
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
{
|
||
|
|
||
|
options = {
|
||
|
calendar = {
|
||
|
enable = lib.mkEnableOption {
|
||
|
description = "Enable calendar.";
|
||
|
default = false;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf (config.gui.enable && config.calendar.enable) {
|
||
|
home-manager.users.${config.user} = {
|
||
|
|
||
|
accounts.calendar.accounts.default = {
|
||
|
basePath = "other/calendars"; # Where to save calendars in ~ directory
|
||
|
name = "personal";
|
||
|
local.type = "filesystem";
|
||
|
primary = true;
|
||
|
remote = {
|
||
|
passwordCommand = [ "" ];
|
||
|
type = "caldav";
|
||
|
url = "https://${config.hostnames.content}/remote.php/dav/principals/users/${config.user}";
|
||
|
userName = config.user;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
home.packages = with pkgs; [ gnome-calendar ];
|
||
|
};
|
||
|
};
|
||
|
}
|