1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-09 10:31:06 +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:
Andrew Jeffery 2025-12-03 04:02:13 +00:00 committed by Matthieu Coudron
parent bcc7afa1d8
commit 43173abcb4
3 changed files with 29 additions and 29 deletions

View file

@ -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;
};