Commit e38c90b7 authored by Frédéric Christ's avatar Frédéric Christ
Browse files

nixos/mautrix-signal: Reformat code

parent b59b54ba
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
{ lib
, config
, pkgs
, ...
{
  lib,
  config,
  pkgs,
  ...
}:
let
  cfg = config.services.mautrix-signal;
@@ -111,7 +112,8 @@ in

    serviceDependencies = lib.mkOption {
      type = with lib.types; listOf str;
      default = (lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
      default =
        (lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
        ++ (lib.optional config.services.matrix-conduit.enable "conduit.service");
      defaultText = lib.literalExpression ''
        (optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
@@ -154,7 +156,9 @@ in
    };

    # Note: this is defined here to avoid the docs depending on `config`
    services.mautrix-signal.settings.homeserver = optOneOf (with config.services; [
    services.mautrix-signal.settings.homeserver = optOneOf (
      with config.services;
      [
        (lib.mkIf matrix-synapse.enable (mkDefaults {
          domain = matrix-synapse.settings.server_name;
        }))
@@ -162,7 +166,8 @@ in
          domain = matrix-conduit.settings.global.server_name;
          address = "http://localhost:${toString matrix-conduit.settings.global.port}";
        }))
    ]);
      ]
    );

    systemd.services.mautrix-signal = {
      description = "mautrix-signal, a Matrix-Signal puppeting bridge.";
@@ -240,7 +245,7 @@ in
        SystemCallErrorNumber = "EPERM";
        SystemCallFilter = [ "@system-service" ];
        Type = "simple";
        UMask = 0027;
        UMask = 27;
      };
      restartTriggers = [ settingsFileUnsubstituted ];
    };