Add: wikijs
This commit is contained in:
parent
4a10a54faa
commit
86f45df825
5 changed files with 54 additions and 36 deletions
|
|
@ -37,9 +37,5 @@
|
|||
url = "levr.porzh.me";
|
||||
user = "levr";
|
||||
};
|
||||
outline = {
|
||||
url = "notes.porzh.me";
|
||||
port = 3001;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,30 @@ in {
|
|||
options = ["defaults" "hidepid=2"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/home/lomig/Documents" = {
|
||||
device = "/srv/raid/home-data/Documents";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
"/home/lomig/Images" = {
|
||||
device = "/srv/raid/home-data/Images";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
"/home/lomig/Musique" = {
|
||||
device = "/srv/raid/home-data/Musique";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
"/home/lomig/Téléchargements" = {
|
||||
device = "/srv/raid/home-data/Téléchargements";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
"/home/lomig/Vidéos" = {
|
||||
device = "/srv/raid/home-data/Vidéos";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
"/home/lomig/nixos-config" = {
|
||||
device = "/srv/raid/home-data/nixos-config";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
"/srv/raid" = {
|
||||
device = "/dev/disk/by-uuid/85f72160-4720-463a-9dc6-7c5216733f2b";
|
||||
fsType = "btrfs";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
'';
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
../modules/common/qemu.nix
|
||||
../modules/services/printing.nix
|
||||
../modules/services/goaccess.nix
|
||||
../modules/services/outline.nix
|
||||
../modules/services/wikijs.nix
|
||||
../modules/sites/porzh.me.nix
|
||||
../modules/sites/levr.porzh.me.nix
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue