nixos/system/home/calendar/default.nix
Evie Litherland-Smith fe1f5bb6a2 Move GPG config to own file
Move home/services/ files up one level, adjust imports accordingly.
2024-10-05 16:39:27 +01:00

67 lines
1.7 KiB
Nix

{ config, pkgs, ... }:
{
home.packages = [
(pkgs.writeShellScriptBin "vdirsyncer-ensure-pass" (builtins.readFile ./vdirsyncer-ensure-pass.sh))
];
programs = {
vdirsyncer.enable = true;
khal = {
enable = true;
locale = {
timeformat = "%H:%M";
dateformat = "%Y-%m-%d";
longdateformat = "%Y-%m-%d %a";
datetimeformat = "%Y-%m-%d %H:%M";
longdatetimeformat = "%Y-%m-%d %H:%M";
};
};
};
services.vdirsyncer.enable = true;
accounts.calendar = {
basePath = "Calendar";
accounts = {
personal =
let
url = "dav.xenia.me.uk";
in
{
primary = true;
primaryCollection = "calendar";
local = {
type = "filesystem";
fileExt = ".ics";
};
remote = {
url = "https://${url}";
type = "caldav";
userName = "pixelifytica";
passwordCommand = [
"${pkgs.libsecret}/bin/secret-tool"
"lookup"
"url"
"${url}"
];
};
vdirsyncer = {
inherit (config.programs.vdirsyncer) enable;
auth = "basic";
collections = [ "from a" ];
metadata = [
"color"
"displayname"
];
timeRange = {
start = "datetime.now() - timedelta(days=365)";
end = "datetime.now() + timedelta(days=365)";
};
};
khal = {
inherit (config.programs.khal) enable;
type = "discover";
addresses = with config.accounts.email.accounts.proton; [ address ] ++ aliases;
};
};
};
};
}