Outline: Difference between revisions
imported>Onny Simplified storage configuration |
imported>Onny Simplified Dex setup |
||
Line 39: | Line 39: | ||
settings = { | settings = { | ||
issuer = "http://dex.localhost"; | issuer = "http://dex.localhost"; | ||
storage | storage.type = "sqlite3"; | ||
web.http = "127.0.0.1:5556"; | web.http = "127.0.0.1:5556"; | ||
staticClients = [ | staticClients = [ | ||
Line 82: | Line 79: | ||
}; | }; | ||
}; | }; | ||
</nowiki>}} | </nowiki>}} |
Revision as of 12:41, 19 November 2023
Outline is a modern web based wiki and knowledge base for teams.
Setup
The most minimal local installation of Outline can be enabled with the following configuration
/etc/nixos/configuration.nix
{ config, pkgs, lib, ... }: {
networking.extraHosts = ''
127.0.0.1 dex.localhost
'';
services = {
outline = {
enable = true;
publicUrl = "http://localhost:3000";
forceHttps = false;
storage.storageType = "local";
oidcAuthentication = {
# Parts taken from
# http://dex.localhost/.well-known/openid-configuration
authUrl = "http://dex.localhost/auth";
tokenUrl = "http://dex.localhost/token";
userinfoUrl = "http://dex.localhost/userinfo";
clientId = "outline";
clientSecretFile = (builtins.elemAt config.services.dex.settings.staticClients 0).secretFile;
scopes = [ "openid" "email" "profile" ];
usernameClaim = "preferred_username";
displayName = "Dex";
};
};
dex = {
enable = true;
settings = {
issuer = "http://dex.localhost";
storage.type = "sqlite3";
web.http = "127.0.0.1:5556";
staticClients = [
{
id = "outline";
name = "Outline Client";
redirectURIs = [ "http://localhost:3000/auth/oidc.callback" ];
secretFile = "${pkgs.writeText "outline-oidc-secret" "test123"}";
}
];
connectors = [
{
type = "mockPassword";
id = "mock";
name = "Example";
config = {
username = "admin";
password = "password";
};
}
];
};
};
nginx = {
enable = true;
virtualHosts = {
"localhost" = {
locations."/" = {
proxyPass = "${config.services.outline.publicUrl}";
};
};
"dex.localhost" = {
locations."/" = {
proxyPass = "http://${config.services.dex.settings.web.http}";
};
};
};
};
};
Outline is available at http://localhost . Choose login provider "Dex" and authenticate with the example mock login admin
and password
.