mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-18 23:50:07 +03:00

After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
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 "Multimedia Messaging Service Daemon";
|
|
extraArgs = mkOption {
|
|
type = with types; listOf str;
|
|
description = "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";
|
|
};
|
|
};
|
|
};
|
|
}
|