This commit is contained in:
Fiona Grzebien 2024-11-08 01:45:53 +01:00
parent 94e279094a
commit 89ae33930e

View file

@ -1,6 +1,29 @@
{ pkgs, ... }: { pkgs, ... }:
let
masConfig = (pkgs.formats.yaml { }).generate "matrix-authentication-service-config.yaml" {
};
in
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
matrix-authentication-service matrix-authentication-service
]; ];
systemd.services.matrix-authentication-service = {
description = "Matrix Authentication Service";
after = [ "postgresql.service" ];
serviceConfig = {
Type = "simple";
ExecReload = "${pkgs.util-linux}/bin/kill -HUP $MAINPID";
Restart = "on-abort";
User = "mas";
Group = "nogroup";
WorkingDirectory = pkgs.matrix-authentication-service;
ExecStart = "${pkgs.matrix-authentication-service}/bin/mas-cli server --config=${masConfig}";
SyslogIdentifier = "matrix-authentication-service";
};
wantedBy = [ "multi-user.target" ];
};
} }