Allow setting the zoom level of the map
This commit is contained in:
parent
2707d84a50
commit
453c004e89
1 changed files with 10 additions and 0 deletions
10
default.nix
10
default.nix
|
@ -5,6 +5,13 @@
|
|||
type = lib.types.package;
|
||||
};
|
||||
|
||||
map = {
|
||||
zoom = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.int;
|
||||
default = 2;
|
||||
};
|
||||
};
|
||||
|
||||
requestParams = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
@ -13,6 +20,7 @@
|
|||
config = {
|
||||
scripts.output = pkgs.writeShellApplication {
|
||||
name = "map";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
imagemagick
|
||||
|
@ -26,6 +34,8 @@
|
|||
requestParams = [
|
||||
"size=640x300"
|
||||
"scale=2"
|
||||
(lib.mkIf (config.map.zoom != null)
|
||||
"zoom=${toString config.map.zoom}")
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue