mepo: init module
This commit is contained in:
parent
e6b7773072
commit
5f07247a07
@ -457,6 +457,14 @@
|
||||
<link linkend="opt-services.uptime-kuma.enable">services.uptime-kuma</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="https://mepo.milesalan.com">Mepo</link>, a
|
||||
fast, simple, hackable OSM map viewer for mobile and desktop
|
||||
Linux. Available as
|
||||
<link linkend="opt-programs.mepo.enable">programs.mepo.enable</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section xml:id="sec-release-22.11-incompatibilities">
|
||||
|
@ -149,6 +149,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
|
||||
|
||||
- [Uptime Kuma](https://uptime.kuma.pet/), a fancy self-hosted monitoring tool. Available as [services.uptime-kuma](#opt-services.uptime-kuma.enable).
|
||||
|
||||
- [Mepo](https://mepo.milesalan.com), a fast, simple, hackable OSM map viewer for mobile and desktop Linux. Available as [programs.mepo.enable](#opt-programs.mepo.enable).
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
## Backward Incompatibilities {#sec-release-22.11-incompatibilities}
|
||||
|
@ -187,6 +187,7 @@
|
||||
./programs/liboping.nix
|
||||
./programs/light.nix
|
||||
./programs/mdevctl.nix
|
||||
./programs/mepo.nix
|
||||
./programs/mosh.nix
|
||||
./programs/mininet.nix
|
||||
./programs/msmtp.nix
|
||||
|
46
nixos/modules/programs/mepo.nix
Normal file
46
nixos/modules/programs/mepo.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ pkgs, config, lib, ...}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.mepo;
|
||||
in
|
||||
{
|
||||
options.programs.mepo = {
|
||||
enable = mkEnableOption (mdDoc "Mepo");
|
||||
|
||||
locationBackends = {
|
||||
gpsd = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = mdDoc ''
|
||||
Whether to enable location detection via gpsd.
|
||||
This may require additional configuration of gpsd, see [here](#opt-services.gpsd.enable)
|
||||
'';
|
||||
};
|
||||
|
||||
geoclue = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = mdDoc "Whether to enable location detection via geoclue";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = 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 = mkIf cfg.locationBackends.geoclue {
|
||||
enable = true;
|
||||
appConfig.where-am-i = {
|
||||
isAllowed = true;
|
||||
isSystem = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.gpsd.enable = cfg.locationBackends.gpsd;
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ laalsaas ];
|
||||
}
|
Loading…
Reference in New Issue
Block a user