1 { pkgs, config, lib, ...}:
3 cfg = config.programs.mepo;
6 options.programs.mepo = {
7 enable = lib.mkEnableOption "Mepo, a fast, simple and hackable OSM map viewer";
11 type = lib.types.bool;
14 Whether to enable location detection via gpsd.
15 This may require additional configuration of gpsd, see [here](#opt-services.gpsd.enable)
19 geoclue = lib.mkOption {
20 type = lib.types.bool;
22 description = "Whether to enable location detection via geoclue";
27 config = lib.mkIf cfg.enable {
28 environment.systemPackages = with pkgs; [
30 ] ++ lib.optional cfg.locationBackends.geoclue geoclue2-with-demo-agent
31 ++ lib.optional cfg.locationBackends.gpsd gpsd;
33 services.geoclue2 = lib.mkIf cfg.locationBackends.geoclue {
35 appConfig.where-am-i = {
41 services.gpsd.enable = cfg.locationBackends.gpsd;
44 meta.maintainers = with lib.maintainers; [ laalsaas ];