mirror of
https://github.com/nmasur/dotfiles
synced 2026-01-13 12:41:15 +00:00
enable thunderbird for tasks, calendar, and email gui
This commit is contained in:
@@ -32,7 +32,6 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
accounts.calendar.accounts.default = {
|
||||
basePath = "other/calendars"; # Where to save calendars in ~ directory
|
||||
name = "personal";
|
||||
local.type = "filesystem";
|
||||
primary = true;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBTYTRy
|
||||
elYzTGpSNDQ3UEcwTXlVeGJleUJmWWhaeDdDQTFRcGpmNlNrQlNVCjA5L2JrS3Vx
|
||||
Q0cyRkk5dTBLOHJXa0xJSG9MTDFnNjV1M0F5L3F5RUlVbW8KLT4gc3NoLWVkMjU1
|
||||
MTkgWXlTVU1RIG5vNm1Xem9lN2pkS25WRi9xSlpZUjhuYmdUVDUvc2o4M0xqYURR
|
||||
UmY0VGcKWVVQc2wyV0Jqbk9JR3N4bW5HOXFTZHpCa25EMC85eThQY05MdHdaeXZy
|
||||
VQotPiBzc2gtZWQyNTUxOSBuanZYNUEgWXRVa3c4STZ3WmFaNThSdE1QdVpiMVR1
|
||||
cm5hYXJsckZiRGtXLzN5RzJEawpkVHBscFd2c0R1SGxnZ3lKUnNnMEZtTUxoQlB4
|
||||
dVBEbTkvUzBJSVRiV1hBCi0+IHNzaC1lZDI1NTE5IENxSU9VQSAvQjhVam1heHNU
|
||||
elVrVGtvaUx1elFCeTdNTkRnN3c5NEc5MWg4dDU3NUhzCm5sUlhHclJrNldnVDhF
|
||||
MTV2cGd3ZFhFdm1rM2ExWVFXbkNJYWlWY0VnUmsKLT4gc3NoLWVkMjU1MTkgejFP
|
||||
Y1p3IGc1QUdkZEp0Z0xEekFjcHd4WVFVam9BZTBEQm9NR3QzQmxNS09VVXpHV2sK
|
||||
c2tYSElVK2prRlF3VlFqKzlVUFRHUWU3TmFXcEdsV2FKWVhKT3pWZkxVNAotLS0g
|
||||
c1cxdk5sL1c3dDZuVGp5VWJrTlBGZTByNjRxMGxTdHd0NFNHV1pyN2k5Ywr7SW9q
|
||||
/FaTTUHB5QiCihA+385sNogq7Q1RvgT2Dwn9NdmMRd/ObESbokJXVSiDDEt6d39s
|
||||
D/uoDY20p3PCk4julNn1
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
@@ -0,0 +1,106 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) hostnames;
|
||||
cfg = config.nmasur.presets.programs.thunderbird;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.programs.thunderbird = {
|
||||
enable = lib.mkEnableOption "Thunderbird email client";
|
||||
calendar = {
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Username for the calendar service backend";
|
||||
default = config.nmasur.settings.username;
|
||||
};
|
||||
passwordCommand = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Password for the calendar service backend";
|
||||
default = config.accounts.email.accounts.home.passwordCommand;
|
||||
};
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for the calendar service backend";
|
||||
default = hostnames.content;
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "URL for the calendar service backend";
|
||||
default = "https://${cfg.calendar.hostname}/remote.php/dav";
|
||||
};
|
||||
};
|
||||
tasks = {
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Username for the tasks service backend";
|
||||
default = config.nmasur.settings.username;
|
||||
};
|
||||
passwordCommand = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Password for the tasks service backend";
|
||||
default = "${lib.getExe pkgs.age} --decrypt --identity ~/.ssh/id_ed25519 ${pkgs.writeText "taskspass.age" (builtins.readFile ./taskspass.age)}";
|
||||
};
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for the tasks service backend";
|
||||
default = hostnames.content;
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "URL for the tasks service backend";
|
||||
default = "https://${cfg.tasks.hostname}/remote.php/dav";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
accounts.email.accounts.home.thunderbird = {
|
||||
enable = true;
|
||||
profiles = [ "default" ];
|
||||
};
|
||||
accounts.calendar.basePath = "other/calendars"; # Where to save calendars in ~ directory
|
||||
# accounts.calendar.accounts.home = {
|
||||
# local.type = "filesystem";
|
||||
# primary = true;
|
||||
# remote = {
|
||||
# passwordCommand = [ cfg.calendar.passwordCommand ];
|
||||
# type = "caldav";
|
||||
# url = cfg.calendar.url;
|
||||
# userName = cfg.calendar.username;
|
||||
# };
|
||||
# thunderbird = {
|
||||
# enable = true;
|
||||
# profiles = [ "default" ];
|
||||
# };
|
||||
# };
|
||||
# accounts.calendar.accounts.tasks = {
|
||||
# local.type = "filesystem";
|
||||
# primary = false;
|
||||
# remote = {
|
||||
# passwordCommand = [ cfg.tasks.passwordCommand ];
|
||||
# type = "caldav";
|
||||
# url = cfg.tasks.url;
|
||||
# userName = cfg.tasks.username;
|
||||
# };
|
||||
# thunderbird = {
|
||||
# enable = true;
|
||||
# profiles = [ "default" ];
|
||||
# };
|
||||
# };
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user