🚀 fix email
This commit is contained in:
parent
a08c7f7785
commit
9aaba816a2
6 changed files with 97 additions and 8 deletions
|
|
@ -1,7 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./rofi ./kitty.nix ./zathura.nix ./spotify.nix ./firefox.nix ];
|
||||
imports = [
|
||||
./email.nix
|
||||
./firefox.nix
|
||||
./kitty.nix
|
||||
./rofi
|
||||
./spotify.nix
|
||||
./zathura.nix
|
||||
];
|
||||
home-manager.users.moritz = {
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = { home.packages = with pkgs; [ thunderbird ]; };
|
||||
let
|
||||
name = "Moritz Böhme";
|
||||
email = "mail@moritzboeh.me";
|
||||
mailDirectory = "/home/moritz/.mail";
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [ protonmail-bridge ];
|
||||
systemd.user.services.protonmail-bridge = {
|
||||
description = "Protonmail Bridge";
|
||||
|
|
@ -14,5 +16,63 @@
|
|||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home = { packages = with pkgs; [ thunderbird ]; };
|
||||
programs = {
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
frequency = "*:0/15";
|
||||
preExec = "${pkgs.isync}/bin/mbsync -Ha";
|
||||
postExec = "${pkgs.mu}/bin/mu index -m ${mailDirectory}";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = mailDirectory;
|
||||
accounts = {
|
||||
default = {
|
||||
address = email;
|
||||
userName = email;
|
||||
flavor = "plain";
|
||||
primary = true;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat /run/agenix/email";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
patterns = [ "*" ];
|
||||
};
|
||||
realName = name;
|
||||
msmtp.enable = true;
|
||||
mu.enable = true;
|
||||
imap = {
|
||||
host = "127.0.0.1";
|
||||
port = 1143;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
certificatesFile =
|
||||
"/home/moritz/.config/protonmail/bridge/cert.pem";
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "127.0.0.1";
|
||||
port = 1025;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
certificatesFile =
|
||||
"/home/moritz/.config/protonmail/bridge/cert.pem";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue