diff --git a/marker.nix b/marker.nix index f604539..3f1964f 100644 --- a/marker.nix +++ b/marker.nix @@ -27,13 +27,35 @@ let default = null; }; - style.label = lib.mkOption { - type = lib.types.nullOr - (lib.types.strMatching "[0-9A-Z]"); - default = null; + style = { + label = lib.mkOption { + type = lib.types.nullOr + (lib.types.strMatching "[0-9A-Z]"); + default = null; + }; + + color = lib.mkOption { + type = colorType; + default = "red"; + }; }; }; }; + + colorType = lib.types.either + (lib.types.strMatching "0x[0-9A-F]{3}[0-9A-F]{3}?") + (lib.types.enum [ + "black" + "blue" + "brown" + "gray" + "green" + "orange" + "purple" + "red" + "white" + "yellow" + ]); in { options = { @@ -54,6 +76,10 @@ in ganondorf.departure = { location = "Argentinia"; + + style = { + color = "green"; + }; }; }; @@ -83,6 +109,7 @@ in lib.optional (marker.style.label != null) "label:${marker.style.label}" ++ [ + "color:${marker.style.color}" "$(${config.scripts.geocode}/bin/geocode ${ lib.escapeShellArg marker.location })"