Add: smtp & outline
This commit is contained in:
parent
41c8f8dd05
commit
b65ebe1186
4 changed files with 57 additions and 0 deletions
26
modules/common/smtp.nix
Normal file
26
modules/common/smtp.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
programs.msmtp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
accounts.default = {
|
||||||
|
host = "smtp.protonmail.ch";
|
||||||
|
port = 587;
|
||||||
|
auth = true;
|
||||||
|
tls = true;
|
||||||
|
tls_starttls = true;
|
||||||
|
user = "contact@porzh.me";
|
||||||
|
passwordeval = "cat /run/secrets/proton_pass";
|
||||||
|
from = "contact@porzh.me";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.msmtp ];
|
||||||
|
|
||||||
|
# On place le lien symbolique dans /etc/alternatives, qui est modifiable
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /etc/alternatives/sendmail - - - - ${pkgs.msmtp}/bin/msmtp"
|
||||||
|
"L+ /usr/sbin/sendmail - - - - ${pkgs.msmtp}/bin/msmtp"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.pathsToLink = [ "/etc/alternatives" "/usr/sbin" ];
|
||||||
|
}
|
||||||
28
modules/services/outline.nix
Normal file
28
modules/services/outline.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
services = {
|
||||||
|
outline = {
|
||||||
|
enable = true;
|
||||||
|
port = 3002 ;
|
||||||
|
publicUrl = "http://notes.porzh.me";
|
||||||
|
forceHttps = true;
|
||||||
|
smtp = {
|
||||||
|
host = "smtp.protonmail.ch";
|
||||||
|
username = "contact@porzh.me";
|
||||||
|
passwordFile = "/run/secrets/proton_pass";
|
||||||
|
fromEmail = "contact@porzh.me";
|
||||||
|
replyEmail = "contact@porzh.me";
|
||||||
|
port = 587 ;
|
||||||
|
secure = false;
|
||||||
|
};
|
||||||
|
storage.storageType = "local";
|
||||||
|
};
|
||||||
|
caddy = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."notes.porzh.me" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy localhost:3002
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
imports = [
|
imports = [
|
||||||
../modules/roles/server.nix
|
../modules/roles/server.nix
|
||||||
../modules/common/base.nix
|
../modules/common/base.nix
|
||||||
|
../modules/common/smtp.nix
|
||||||
../modules/common/qemu.nix
|
../modules/common/qemu.nix
|
||||||
../modules/services/printing.nix
|
../modules/services/printing.nix
|
||||||
../modules/services/goaccess.nix
|
../modules/services/goaccess.nix
|
||||||
|
../modules/services/outline.nix
|
||||||
../modules/sites/porzh.me.nix
|
../modules/sites/porzh.me.nix
|
||||||
../modules/sites/levr.porzh.me.nix
|
../modules/sites/levr.porzh.me.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
../modules/common/lockscreen.nix
|
../modules/common/lockscreen.nix
|
||||||
../modules/common/energy.nix
|
../modules/common/energy.nix
|
||||||
../modules/common/qemu.nix
|
../modules/common/qemu.nix
|
||||||
|
../modules/common/smtp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue