Outline: Difference between revisions
imported>Onny mNo edit summary |
imported>Onny mNo edit summary |
||
Line 6: | Line 6: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
services = { | |||
outline = { | |||
enable = true; | |||
publicUrl = "localhost:3000"; | |||
forceHttps = false; | |||
storage = { | |||
accessKey = "outline"; | |||
secretKeyFile = "/var/lib/outline/storage_secret"; | |||
uploadBucketUrl = "http://storage.localhost"; | |||
uploadBucketName = "outline"; | |||
}; | }; | ||
oidcAuthentication = { | |||
authUrl = ""; | |||
clientId = (builtins.elemAt config.services.dex.settings.staticClients 0).id; | |||
clientSecretFile = (builtins.elemAt config.services.dex.settings.staticClients 0).secretFile; | |||
tokenUrl = ""; | |||
userinfoUrl = ""; | |||
#usernameClaim = ""; | |||
}; | }; | ||
}; | |||
minio = { | |||
enable = true; | |||
listenAddress = "127.0.0.1:9000"; | |||
consoleAddress = "127.0.0.1:9001"; | |||
rootCredentialsFile = "/var/lib/minio/minio-credentials"; | |||
}; | |||
nginx = { | |||
enable = true; | |||
virtualHosts = { | |||
"localhost" = { | |||
locations."/" = { | |||
proxyPass = "http://${config.services.outline.publicUrl}"; | |||
}; | }; | ||
}; | |||
"storage.localhost" = { | |||
locations."/" = { | |||
proxyPass = "http://${config.services.minio.listenAddress}"; | |||
}; | }; | ||
}; | |||
"console.storage.localhost" = { | |||
locations."/" = { | |||
proxyPass = "http://${config.services.minio.consoleAddress}"; | |||
}; | }; | ||
}; | |||
"dex.localhost" = { | |||
locations."/" = { | |||
proxyPass = "http://${config.services.dex.settings.web.http}"; | |||
}; | }; | ||
}; | }; | ||
}; | }; | ||
}; | |||
dex = { | |||
environmentFile = "/secrets/dex-env"; | |||
enable = true; | |||
settings = { | |||
issuer = "http://dex.localhost"; | |||
storage = { | |||
type = "sqlite3"; | |||
config.file = "/var/lib/dex/db.sqlite3"; | |||
}; | |||
web = { | |||
http = "127.0.0.1:5556"; | |||
}; | }; | ||
# enablePasswordDB = true; | |||
staticClients = [ | |||
{ | |||
id = "outline"; | |||
name = "Outline Client"; | |||
redirectURIs = [ "http://localhost/auth/oidc.callback" ]; | |||
secretFile = "/var/lib/dex/outline-oidc-secret"; | |||
} | |||
]; | |||
connectors = []; | |||
}; | }; | ||
}; | |||
}; | |||
systemd.services.dex = { | |||
serviceConfig.StateDirectory = "dex"; | |||
}; | |||
</nowiki>}} | </nowiki>}} | ||