67 lines
2.0 KiB
Nix
Raw Normal View History

{ config, lib, inputs, ... }: {
2024-01-22 16:44:51 +03:00
sops.secrets = let
2023-07-26 21:20:52 +03:00
default = {
2024-01-22 16:44:51 +03:00
sopsFile = inputs.self.secretsDir + /home-hypervisor/outline.yaml;
2023-07-26 21:20:52 +03:00
owner = config.services.outline.user;
2024-01-22 16:44:51 +03:00
restartUnits = [ "outline.service" ];
2023-07-26 21:20:52 +03:00
};
in {
2024-01-22 16:44:51 +03:00
outline-minio-key = default;
2023-07-26 21:20:52 +03:00
outline-mail = default;
outline-oidc = default;
outline-key = default;
outline-utils = default;
};
2024-01-21 16:26:48 +03:00
services.outline = {
enable = true;
port = 3010;
publicUrl = "https://docs.ataraxiadev.com";
forceHttps = false;
2023-07-26 21:20:52 +03:00
2024-01-21 16:26:48 +03:00
storage = {
accessKey = "outline";
2024-01-22 16:44:51 +03:00
secretKeyFile = config.sops.secrets.outline-minio-key.path;
2024-01-21 16:26:48 +03:00
region = config.services.minio.region;
uploadBucketUrl = "https://s3.ataraxiadev.com";
uploadBucketName = "outline";
# uploadMaxSize = 0;
};
2023-07-26 21:20:52 +03:00
2024-01-21 16:26:48 +03:00
oidcAuthentication = {
authUrl = "https://auth.ataraxiadev.com/application/o/authorize/";
tokenUrl = "https://auth.ataraxiadev.com/application/o/token/";
userinfoUrl = "https://auth.ataraxiadev.com/application/o/userinfo/";
clientId = "tUs7tv85xlK3W4VOw7AQDMYNXqibpV5H8ofR7zix";
2024-01-22 16:44:51 +03:00
clientSecretFile = config.sops.secrets.outline-oidc.path;
2024-01-21 16:26:48 +03:00
scopes = [ "openid" "email" "profile" ];
usernameClaim = "email";
displayName = "openid";
2023-07-26 21:20:52 +03:00
};
2024-01-21 16:26:48 +03:00
smtp = {
host = "mail.ataraxiadev.com";
port = 465;
secure = true;
username = "outline@ataraxiadev.com";
2024-01-22 16:44:51 +03:00
passwordFile = config.sops.secrets.outline-mail.path;
2024-01-21 16:26:48 +03:00
fromEmail = "Outline <no-reply@ataraxiadev.com>";
replyEmail = "Outline <outline@ataraxiadev.com>";
2023-07-26 21:20:52 +03:00
};
2024-01-22 16:44:51 +03:00
secretKeyFile = config.sops.secrets.outline-key.path;
utilsSecretFile = config.sops.secrets.outline-utils.path;
2024-01-21 16:26:48 +03:00
};
2023-07-26 21:20:52 +03:00
systemd.services.outline.after =
lib.mkIf config.services.authentik.enable [
"authentik-server.service"
"authentik-worker.service"
"nginx.service"
];
2024-01-24 17:28:46 +03:00
backups.postgresql.outline = {};
2024-01-21 16:26:48 +03:00
persist.state.directories = [
2023-07-26 21:20:52 +03:00
"/var/lib/redis-outline"
];
}