Outline

From NixOS Wiki
Revision as of 16:38, 19 January 2023 by imported>Onny (Inital page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[ Outline] is a modern web based wiki and knowledge base for teams.

Installation

The most minimal local installation of Outline can be enabled with the following configuration

/etc/nixos/configuration.nix
  services = {

    outline = {
      enable = true;
      publicUrl = "localhost:3000";
      forceHttps = false;

      storage = {
        accessKey = "outline";
        secretKeyFile = "/var/lib/outline/storage_secret";
        uploadBucketUrl = "http://storage.localhost";
        uploadBucketName = "outline";
      };
    };

    minio = {
      enable = true;
      listenAddress = "127.0.0.1:9000";
      consoleAddress = "127.0.0.1:9001";
      rootCredentialsFile = "/path/to/secrets/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 = {
        # External url
        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";
  };

See also

  • Mediawiki, PHP- and web-based wiki software.
  • DokuWiki, simple PHP- and web-based wiki software which uses file based storage for its content.