Clean up wiki.nix, split to outline, paperless and plausible
This commit is contained in:
parent
14cedb8ad0
commit
0eeeba1192
4 changed files with 67 additions and 47 deletions
|
@ -83,8 +83,9 @@
|
||||||
./modules/mail.nix
|
./modules/mail.nix
|
||||||
./modules/monitoring/monitoring.nix
|
./modules/monitoring/monitoring.nix
|
||||||
# ./modules/calibre.nix
|
# ./modules/calibre.nix
|
||||||
./modules/wiki.nix
|
./modules/paperless.nix
|
||||||
./modules/outline.nix
|
./modules/outline.nix
|
||||||
|
./modules/plausible.nix
|
||||||
./modules/vaultwarden.nix
|
./modules/vaultwarden.nix
|
||||||
./modules/hledger.nix
|
./modules/hledger.nix
|
||||||
./modules/etesync.nix
|
./modules/etesync.nix
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
# Open paperless port, but only for local network
|
# Open paperless port, but only for local network
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
|
@ -7,6 +7,10 @@
|
||||||
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 9910:9910 -j nixos-fw-accept
|
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 9910:9910 -j nixos-fw-accept
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"f /run/agenix/outline_gmail 0600 outline users -"
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
minio = {
|
minio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 28981:28981 -j nixos-fw-accept
|
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 28981:28981 -j nixos-fw-accept
|
||||||
|
@ -10,12 +10,7 @@
|
||||||
paperless-web.after = [ "var-lib-paperless.mount" ];
|
paperless-web.after = [ "var-lib-paperless.mount" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"f /run/agenix/outline_gmail 0600 outline users -"
|
|
||||||
];
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
# TODO: Change passwordFile location, use agenix
|
|
||||||
paperless = {
|
paperless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
address = "0.0.0.0";
|
address = "0.0.0.0";
|
||||||
|
@ -34,28 +29,6 @@
|
||||||
PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS = true;
|
PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
plausible = {
|
|
||||||
enable = true;
|
|
||||||
releaseCookiePath = "/run/agenix/chatgpt_api_key";
|
|
||||||
server = {
|
|
||||||
secretKeybaseFile = "/run/agenix/enterprise-nix-cache-key-sec";
|
|
||||||
disableRegistration = true;
|
|
||||||
port = 13231;
|
|
||||||
baseUrl = "https://analytics.bhankas.org";
|
|
||||||
};
|
|
||||||
adminUser = {
|
|
||||||
activate = true;
|
|
||||||
name = "root";
|
|
||||||
email = "admin@bhankas.org";
|
|
||||||
passwordFile = "/run/agenix/maildir_relekarpayas_onedrive";
|
|
||||||
};
|
|
||||||
database = {
|
|
||||||
clickhouse.setup = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: Split to their respective locations
|
|
||||||
nginx = {
|
nginx = {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"paperless.bhankas.org" = {
|
"paperless.bhankas.org" = {
|
||||||
|
@ -69,18 +42,6 @@
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"analytics.bhankas.org" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:13231";
|
|
||||||
proxyWebsockets = false;
|
|
||||||
extraConfig =
|
|
||||||
"proxy_set_header Host $host;"
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -92,11 +53,6 @@
|
||||||
email = "admin@bhankas.org";
|
email = "admin@bhankas.org";
|
||||||
dnsResolver = "1.1.1.1:53";
|
dnsResolver = "1.1.1.1:53";
|
||||||
};
|
};
|
||||||
|
|
||||||
"analytics.bhankas.org" = {
|
|
||||||
email = "admin@bhankas.org";
|
|
||||||
dnsResolver = "1.1.1.1:53";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
59
modules/plausible.nix
Normal file
59
modules/plausible.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
plausible = {
|
||||||
|
enable = true;
|
||||||
|
releaseCookiePath = "/run/agenix/chatgpt_api_key";
|
||||||
|
server = {
|
||||||
|
secretKeybaseFile = "/run/agenix/enterprise-nix-cache-key-sec";
|
||||||
|
disableRegistration = true;
|
||||||
|
port = 13231;
|
||||||
|
baseUrl = "https://analytics.bhankas.org";
|
||||||
|
};
|
||||||
|
adminUser = {
|
||||||
|
activate = true;
|
||||||
|
name = "root";
|
||||||
|
email = "admin@bhankas.org";
|
||||||
|
passwordFile = "/run/agenix/maildir_relekarpayas_onedrive";
|
||||||
|
};
|
||||||
|
database = {
|
||||||
|
clickhouse.setup = true;
|
||||||
|
};
|
||||||
|
mail = {
|
||||||
|
email = "gandalf@bhankas.org";
|
||||||
|
smtp = {
|
||||||
|
enableSSL = true;
|
||||||
|
hostAddr = "smtp.purelymail.com";
|
||||||
|
hostPort = 587;
|
||||||
|
passwordFile = "/run/agenix/gandalf_mail";
|
||||||
|
user = "gandalf@bhankas.org";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"analytics.bhankas.org" = {
|
||||||
|
addSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:13231";
|
||||||
|
proxyWebsockets = false;
|
||||||
|
extraConfig =
|
||||||
|
"proxy_set_header Host $host;"
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.acme = {
|
||||||
|
certs = {
|
||||||
|
"analytics.bhankas.org" = {
|
||||||
|
email = "admin@bhankas.org";
|
||||||
|
dnsResolver = "1.1.1.1:53";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in a new issue