2023-06-25 02:05:50 +00:00
|
|
|
# docs: <https://git.sr.ht/~mil/mepo>
|
|
|
|
# irc #mepo:irc.oftc.net
|
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
sane.programs.mepo = {
|
2024-02-17 15:08:21 +00:00
|
|
|
sandbox.method = "bwrap";
|
|
|
|
sandbox.net = "all"; # for tiles *and* for localhost comm to gpsd
|
|
|
|
sandbox.whitelistDri = true;
|
|
|
|
sandbox.whitelistWayland = true;
|
|
|
|
sandbox.whitelistDbus = [ "user" ]; # for geoclue
|
|
|
|
|
2023-11-08 15:32:50 +00:00
|
|
|
persist.byStore.plaintext = [ ".cache/mepo/tiles" ];
|
2023-06-25 02:05:50 +00:00
|
|
|
# ~/.cache/mepo/savestate has precise coordinates and pins: keep those private
|
2023-11-08 15:32:50 +00:00
|
|
|
persist.byStore.private = [
|
2023-07-08 01:35:36 +00:00
|
|
|
{ type = "file"; path = ".cache/mepo/savestate"; }
|
|
|
|
];
|
2023-06-25 02:05:50 +00:00
|
|
|
|
2023-07-25 12:02:58 +00:00
|
|
|
# give mepo access to gpsd for location data, if that's enabled.
|
|
|
|
# same with geoclue2.
|
|
|
|
suggestedPrograms = lib.optional config.services.gpsd.enable "gpsd"
|
|
|
|
++ lib.optional config.services.geoclue2.enable "geoclue2-with-demo-agent"
|
|
|
|
;
|
2023-06-25 02:05:50 +00:00
|
|
|
};
|
2023-07-25 12:02:58 +00:00
|
|
|
|
|
|
|
# programs.mepo = lib.mkIf config.sane.programs.mepo.enabled {
|
|
|
|
# # enable location services (via geoclue)
|
|
|
|
# enable = true;
|
|
|
|
# # more precise, via gpsd ("may require additional config")
|
|
|
|
# # programs.mepo.gpsd.enable = true
|
|
|
|
# };
|
2023-06-25 02:05:50 +00:00
|
|
|
}
|