Allow configuring the size of pins

This commit is contained in:
Manuel Thalmann 2024-04-28 18:32:43 +02:00
parent 4caca606a3
commit 32904e238f

View file

@ -38,6 +38,17 @@ let
type = colorType;
default = "red";
};
size = lib.mkOption {
type = lib.types.enum [
"tiny"
"small"
"medium"
"large"
];
default = "medium";
};
};
};
};
@ -72,6 +83,7 @@ in
users = {
manuel.departure = {
location = "Switzerland";
style.size = "small";
};
ganondorf.departure = {
@ -105,9 +117,19 @@ in
paramForMarker =
marker:
let
size = {
tiny = "tiny";
small = "small";
medium = "mid";
large = null;
}.${marker.style.size};
attributes =
lib.optional (marker.style.label != null)
"label:${marker.style.label}"
lib.optional
(marker.style.label != null)
"label:${marker.style.label}"
++ lib.optional
(size != null)
"size:${size}"
++ [
"color:${marker.style.color}"
"$(${config.scripts.geocode}/bin/geocode ${