Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.2 KiB
Nix

{
pkgs,
config,
lib,
...
}:
let
cfg = config.programs.mepo;
in
{
options.programs.mepo = {
enable = lib.mkEnableOption "Mepo, a fast, simple and hackable OSM map viewer";
locationBackends = {
gpsd = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to enable location detection via gpsd.
This may require additional configuration of gpsd, see [here](#opt-services.gpsd.enable)
'';
};
geoclue = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to enable location detection via geoclue";
};
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages =
with pkgs;
[
mepo
]
++ lib.optional cfg.locationBackends.geoclue geoclue2-with-demo-agent
++ lib.optional cfg.locationBackends.gpsd gpsd;
services.geoclue2 = lib.mkIf cfg.locationBackends.geoclue {
enable = true;
appConfig.where-am-i = {
isAllowed = true;
isSystem = false;
};
};
services.gpsd.enable = cfg.locationBackends.gpsd;
};
meta.maintainers = with lib.maintainers; [ laalsaas ];
}