❄️ Dotfiles for our NixOS system configuration.

refactor(services:outline): use local db, change properties

Chloe d2aab78d 17024f51

Changed files
+25 -41
services
outline
+25 -41
services/outline/default.nix
···
-
{ config, pkgs, ... }:
+
{ config, ... }:
{
age.secrets = {
···
secretKeyFile = config.age.secrets.outlineSecretKey.path;
utilsSecretFile = config.age.secrets.outlineUtilsSecret.path;
-
databaseUrl = "postgres://outline:${builtins.readFile config.age.secrets.outlineSecretKey.path}@localhost/outline?sslmode=disable";
-
redisUrl = "redis://127.0.0.1:6380";
+
databaseUrl = "local";
+
redisUrl = "local";
+
+
maximumImportSize = 104857600;
storage = {
storageType = "s3";
···
uploadBucketName = "outline";
region = "us-east-1";
uploadMaxSize = 104857600;
-
importMaxSize = 104857600;
-
workspaceImportMaxSize = 104857600;
forcePathStyle = true;
acl = "private";
};
···
host = "smtp.purelymail.com";
port = 587;
username = "noreply@sapphic.moe";
+
replyEmail = "noreply@sapphic.moe";
passwordFile = config.age.secrets.outlineSMTPPassword.path;
fromEmail = "noreply@sapphic.moe";
secure = false;
···
authUrl = "https://id.sappho.systems/authorize";
tokenUrl = "https://id.sappho.systems/api/oidc/token";
userinfoUrl = "https://id.sappho.systems/api/oidc/userinfo";
-
logoutUrl = "https://id.sappho.systems/api/oidc/end-session";
usernameClaim = "preferred_username";
scopes = [
···
"email"
"groups"
];
-
-
disableRedirect = true;
};
};
-
services.postgresql = {
-
enable = true;
-
package = pkgs.postgresql_15;
-
dataDir = "/var/lib/postgresql";
-
enableTCPIP = true;
-
ensureDatabases = [ "outline" ];
-
ensureUsers = [
-
{
-
name = "outline";
-
password = builtins.readFile config.age.secrets.outlineSecretKey.path;
-
}
-
];
-
authentication = pkgs.lib.mkOverride 10 ''
-
#type database DBuser origin-address auth-method
-
local all all trust
-
host all all 127.0.0.1/32 scram-sha-256
-
host all all ::1/128 scram-sha-256
-
'';
-
};
-
-
# Ensure Outline waits for Postgres
-
systemd.services.outline.requires = [ "postgresql.service" ];
-
services.redis.servers."outline" = {
-
enable = true;
-
port = 6380;
-
bind = "127.0.0.1";
-
};
-
services.minio = {
enable = true;
rootCredentialsFile = config.age.secrets.minioCredentials.path;
-
dataDir = "/var/lib/minio";
-
listenAddress = [
-
"0.0.0.0:9000"
-
"0.0.0.0:9001"
-
];
+
dataDir = [ "/var/lib/minio" ];
+
listenAddress = "0.0.0.0:9000";
+
consoleAddress = "0.0.0.0:9001";
};
services.caddy.virtualHosts."wiki.sappho.systems" = {
···
import common
import tls_cloudflare
reverse_proxy http://localhost:3300
+
'';
+
};
+
+
services.caddy.virtualHosts."minio.sappho.systems" = {
+
extraConfig = ''
+
import common
+
import tls_cloudflare
+
reverse_proxy http://localhost:9000
+
'';
+
};
+
+
services.caddy.virtualHosts."minio-admin.sappho.systems" = {
+
extraConfig = ''
+
import common
+
import tls_cloudflare
+
reverse_proxy http://localhost:9001
'';
};