mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Expose qcal's JSON configuration through programs.qcal.settings and per-calendar entries through accounts.calendar.accounts.<name>.qcal.settings. Generated Calendars entries and the account remote projections use mkDefault so users can override or extend them. timezone and defaultNumDays become renamed aliases of the settings keys.
47 lines
929 B
Nix
47 lines
929 B
Nix
{
|
|
programs.qcal = {
|
|
enable = true;
|
|
settings = {
|
|
DefaultNumDays = 7;
|
|
Timezone = "Europe/Paris";
|
|
Custom = true;
|
|
};
|
|
};
|
|
|
|
accounts.calendar.accounts = {
|
|
work = {
|
|
qcal = {
|
|
enable = true;
|
|
settings = {
|
|
Name = "Work";
|
|
Username = "override";
|
|
};
|
|
};
|
|
remote = {
|
|
url = "https://cal.example.com/work";
|
|
userName = "anton";
|
|
passwordCommand = [
|
|
"pass"
|
|
"show"
|
|
"work"
|
|
];
|
|
};
|
|
};
|
|
disabled = {
|
|
qcal.settings.Name = "Disabled";
|
|
remote.url = "https://disabled.example.com/events.ical";
|
|
};
|
|
local.qcal = {
|
|
enable = true;
|
|
settings = {
|
|
Name = "Local";
|
|
Url = "https://local.example.com/events.ical";
|
|
};
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContent home-files/.config/qcal/config.json ${./settings.json-expected}
|
|
'';
|
|
}
|