mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-08 01:51:04 +01:00
pimsync: Make storage names unique
This includes the calendar/contacts prefix in the storage name as well as the pair name to ensure that if the same name is used for contacts and calendar then it is correctly referenced.
This commit is contained in:
parent
bcc7afa1d8
commit
43173abcb4
3 changed files with 29 additions and 29 deletions
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
localStorage = calendar: name: acc: {
|
||||
name = "storage";
|
||||
params = [ "${name}-local" ];
|
||||
params = [ "${if calendar then "calendar" else "contacts"}-${name}-local" ];
|
||||
children =
|
||||
(attrsToDirectives {
|
||||
inherit (acc.local) path;
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
remoteStorage = calendar: name: acc: {
|
||||
name = "storage";
|
||||
params = [ "${name}-remote" ];
|
||||
params = [ "${if calendar then "calendar" else "contacts"}-${name}-remote" ];
|
||||
children =
|
||||
(attrsToDirectives {
|
||||
inherit (acc.remote) url;
|
||||
|
|
@ -91,8 +91,8 @@
|
|||
params = lib.singleton "${if calendar then "calendar" else "contacts"}-${name}";
|
||||
children =
|
||||
(attrsToDirectives {
|
||||
storage_a = "${name}-local";
|
||||
storage_b = "${name}-remote";
|
||||
storage_a = "${if calendar then "calendar" else "contacts"}-${name}-local";
|
||||
storage_b = "${if calendar then "calendar" else "contacts"}-${name}-remote";
|
||||
})
|
||||
++ acc.pimsync.extraPairDirectives;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
accounts.calendar = {
|
||||
accounts.caldav = {
|
||||
accounts.mine = {
|
||||
pimsync.enable = true;
|
||||
remote = {
|
||||
passwordCommand = [
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
};
|
||||
|
||||
accounts.contact = {
|
||||
accounts.carddav = {
|
||||
accounts.mine = {
|
||||
pimsync.enable = true;
|
||||
remote = {
|
||||
passwordCommand = [
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
storage caldav-local {
|
||||
fileext .ics
|
||||
path /home/hm-user/.local/state/calendar/caldav
|
||||
type vdir/icalendar
|
||||
}
|
||||
storage http-local {
|
||||
storage calendar-http-local {
|
||||
fileext .ics
|
||||
path /home/hm-user/.local/state/calendar/http
|
||||
type vdir/icalendar
|
||||
}
|
||||
storage caldav-remote {
|
||||
storage calendar-mine-local {
|
||||
fileext .ics
|
||||
path /home/hm-user/.local/state/calendar/mine
|
||||
type vdir/icalendar
|
||||
}
|
||||
storage calendar-http-remote {
|
||||
type webcal
|
||||
url https://example.com/calendar
|
||||
}
|
||||
storage calendar-mine-remote {
|
||||
type caldav
|
||||
url https://caldav.example.com
|
||||
username alice
|
||||
|
|
@ -16,24 +20,20 @@ storage caldav-remote {
|
|||
cmd pass caldav
|
||||
}
|
||||
}
|
||||
storage http-remote {
|
||||
type webcal
|
||||
url https://example.com/calendar
|
||||
}
|
||||
pair calendar-caldav {
|
||||
storage_a caldav-local
|
||||
storage_b caldav-remote
|
||||
}
|
||||
pair calendar-http {
|
||||
storage_a http-local
|
||||
storage_b http-remote
|
||||
storage_a calendar-http-local
|
||||
storage_b calendar-http-remote
|
||||
}
|
||||
storage carddav-local {
|
||||
pair calendar-mine {
|
||||
storage_a calendar-mine-local
|
||||
storage_b calendar-mine-remote
|
||||
}
|
||||
storage contacts-mine-local {
|
||||
fileext .vcf
|
||||
path /home/hm-user/.local/state/contact/carddav
|
||||
path /home/hm-user/.local/state/contact/mine
|
||||
type vdir/vcard
|
||||
}
|
||||
storage carddav-remote {
|
||||
storage contacts-mine-remote {
|
||||
type carddav
|
||||
url https://carddav.example.com
|
||||
username bob
|
||||
|
|
@ -41,8 +41,8 @@ storage carddav-remote {
|
|||
cmd pass carddav
|
||||
}
|
||||
}
|
||||
pair contacts-carddav {
|
||||
storage_a carddav-local
|
||||
storage_b carddav-remote
|
||||
pair contacts-mine {
|
||||
storage_a contacts-mine-local
|
||||
storage_b contacts-mine-remote
|
||||
}
|
||||
status_path /test/dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue