feat: massive refactoring...

This commit is contained in:
Xavier Morel
2025-11-09 00:45:00 +01:00
parent f9446df46d
commit 3245b6b89f
77 changed files with 3233 additions and 582 deletions

31
config/matrix-mas.nix Normal file
View File

@@ -0,0 +1,31 @@
{
config,
tools,
pkgs,
...
}:
let
yaml = pkgs.format.yaml { };
in
{
environment.systemPackages = [
pkgs.matrix-authentication-service
];
environment.etc = {
"mas/config.yaml".source = yaml.generate "mas-config.yaml" (
import ./matrix-mas.config.yaml { inherit config tools; }
);
"alloy/logs-mas.alloy".text = (import ./alloy/matrix-mas.alloy.nix { inherit config tools; }).out;
};
systemd.services.matrix-authentication-service = {
enable = true;
description = "Matrix Authentication Service";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.matrix-authentication-service}/bin/mas-cli server --config /etc/mas/config.yaml";
Restart = "on-failure";
RestartSec = 5;
};
};
}