nixos/mmsd: init

This commit is contained in:
Julien Moutinho 2022-10-20 14:05:08 +02:00
parent acac950ef6
commit 15046139d5
4 changed files with 50 additions and 0 deletions

View file

@ -44,6 +44,14 @@
<link linkend="opt-services.atuin.enable">services.atuin</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://gitlab.com/kop316/mmsd">mmsd</link>,
a lower level daemon that transmits and recieves MMSes.
Available as
<link linkend="opt-services.mmsd.enable">services.mmsd</link>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://v2raya.org">v2rayA</link>, a Linux

View file

@ -20,6 +20,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [atuin](https://github.com/ellie/atuin), a sync server for shell history. Available as [services.atuin](#opt-services.atuin.enable).
- [mmsd](https://gitlab.com/kop316/mmsd), a lower level daemon that transmits and recieves MMSes. Available as [services.mmsd](#opt-services.mmsd.enable).
- [v2rayA](https://v2raya.org), a Linux web GUI client of Project V which supports V2Ray, Xray, SS, SSR, Trojan and Pingtunnel. Available as [services.v2raya](options.html#opt-services.v2raya.enable).
## Backward Incompatibilities {#sec-release-23.05-incompatibilities}

View file

@ -873,6 +873,8 @@
./services/networking/miniupnpd.nix
./services/networking/miredo.nix
./services/networking/mjpg-streamer.nix
./services/networking/mmsd.nix
./services/networking/mosquitto.nix
./services/networking/monero.nix
./services/networking/morty.nix
./services/networking/mosquitto.nix

View file

@ -0,0 +1,38 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.mmsd;
dbusServiceFile = pkgs.writeTextDir "share/dbus-1/services/org.ofono.mms.service" ''
[D-BUS Service]
Name=org.ofono.mms
SystemdService=dbus-org.ofono.mms.service
# Exec= is still required despite SystemdService= being used:
# https://github.com/freedesktop/dbus/blob/ef55a3db0d8f17848f8a579092fb05900cc076f5/test/data/systemd-activation/com.example.SystemdActivatable1.service
Exec=${pkgs.coreutils}/bin/false mmsd
'';
in
{
options.services.mmsd = {
enable = mkEnableOption (mdDoc "Multimedia Messaging Service Daemon");
extraArgs = mkOption {
type = with types; listOf str;
description = mdDoc "Extra arguments passed to `mmsd-tng`";
default = [];
example = ["--debug"];
};
};
config = mkIf cfg.enable {
services.dbus.packages = [ dbusServiceFile ];
systemd.user.services.mmsd = {
after = [ "ModemManager.service" ];
aliases = [ "dbus-org.ofono.mms.service" ];
serviceConfig = {
Type = "dbus";
ExecStart = "${pkgs.mmsd-tng}/bin/mmsdtng " + escapeShellArgs cfg.extraArgs;
BusName = "org.ofono.mms";
Restart = "on-failure";
};
};
};
}