Add: wikijs
This commit is contained in:
parent
4a10a54faa
commit
86f45df825
5 changed files with 54 additions and 36 deletions
|
|
@ -1,31 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
globals = import ../../config/globals.nix ;
|
||||
in {
|
||||
services = {
|
||||
outline = {
|
||||
enable = true;
|
||||
port = globals.services.outline.port ;
|
||||
publicUrl = "http://${globals.services.outline.url}";
|
||||
forceHttps = true;
|
||||
smtp = {
|
||||
host = globals.smtp.host ;
|
||||
username = globals.smtp.user ;
|
||||
passwordFile = "/etc/secrets/protonpass";
|
||||
fromEmail = globals.smtp.user;
|
||||
replyEmail = globals.smtp.user;
|
||||
port = globals.smtp.port;
|
||||
secure = false;
|
||||
};
|
||||
storage.storageType = "local";
|
||||
};
|
||||
caddy = {
|
||||
enable = true;
|
||||
virtualHosts.${globals.services.outline.url} = {
|
||||
extraConfig = ''
|
||||
reverse_proxy localhost:${toString globals.services.outline.port}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
29
modules/services/wikijs.nix
Normal file
29
modules/services/wikijs.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.services.wiki-js = {
|
||||
requires = [ "postgresql.service" ];
|
||||
after = [ "postgresql.service" ];
|
||||
};
|
||||
services.wiki-js = {
|
||||
enable = true;
|
||||
port = 3002 ;
|
||||
settings.db = {
|
||||
db = "wiki-js";
|
||||
host = "/run/postgresql";
|
||||
type = "postgres";
|
||||
user = "wiki-js";
|
||||
};
|
||||
};
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "wiki-js" ];
|
||||
ensureUsers = [{
|
||||
name = "wiki-js";
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."notes.porzh.me".extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:3004
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue