2024-11-03 21:06:00 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
sops.secrets."outline/OIDC_CLIENT_SECRET".owner = "outline";
|
|
|
|
sops.secrets."outline/SMTP_PASSWORD".owner = "outline";
|
|
|
|
sops.secrets."outline/S3_SECRET_KEY".owner = "outline";
|
|
|
|
|
|
|
|
services.caddy.virtualHosts."outline.gasdev.fr".extraConfig = ''
|
|
|
|
reverse_proxy http://127.0.0.1:7143
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.outline = {
|
|
|
|
enable = true;
|
|
|
|
port = 7143;
|
|
|
|
publicUrl = "https://outline.gasdev.fr";
|
|
|
|
forceHttps = false;
|
|
|
|
|
|
|
|
oidcAuthentication = {
|
|
|
|
authUrl = "https://auth.gasdev.fr/api/oidc/authorization";
|
|
|
|
userinfoUrl = "https://auth.gasdev.fr/api/oidc/userinfo";
|
|
|
|
tokenUrl = "https://auth.gasdev.fr/api/oidc/token";
|
|
|
|
displayName = "Authelia";
|
|
|
|
clientId = "outline";
|
|
|
|
clientSecretFile = config.sops.secrets."outline/OIDC_CLIENT_SECRET".path;
|
|
|
|
scopes = ["openid" "offline_access" "profile" "email"];
|
|
|
|
};
|
|
|
|
|
|
|
|
smtp = {
|
2024-11-10 19:55:39 +01:00
|
|
|
host = "mail.gasdev.fr";
|
2024-11-03 21:06:00 +01:00
|
|
|
port = 465;
|
2024-11-11 00:15:07 +01:00
|
|
|
username = "postmaster";
|
2024-11-03 21:06:00 +01:00
|
|
|
passwordFile = config.sops.secrets."outline/SMTP_PASSWORD".path;
|
2024-11-11 00:15:07 +01:00
|
|
|
fromEmail = "outline@gasdev.fr";
|
|
|
|
replyEmail = "no-reply@gasdev.fr";
|
2024-11-03 21:06:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
storage = {
|
2024-11-03 22:15:19 +01:00
|
|
|
storageType = "local";
|
|
|
|
localRootDir = "/var/lib/outline/data";
|
2024-11-03 21:06:00 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"outline"
|
|
|
|
];
|
|
|
|
}
|