🚀 fix email

nixos
Moritz Böhme 2022-02-15 16:40:23 +01:00
parent a08c7f7785
commit 9aaba816a2
No known key found for this signature in database
GPG Key ID: 213820E2795F5CF5
6 changed files with 97 additions and 8 deletions

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: { 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 = { home-manager.users.moritz = {
services.nextcloud-client = { services.nextcloud-client = {
enable = true; enable = true;

View File

@ -1,7 +1,9 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let
{ name = "Moritz Böhme";
home-manager.users.moritz = { home.packages = with pkgs; [ thunderbird ]; }; email = "mail@moritzboeh.me";
mailDirectory = "/home/moritz/.mail";
in {
environment.systemPackages = with pkgs; [ protonmail-bridge ]; environment.systemPackages = with pkgs; [ protonmail-bridge ];
systemd.user.services.protonmail-bridge = { systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge"; description = "Protonmail Bridge";
@ -14,5 +16,63 @@
wantedBy = [ "graphical-session.target" ]; wantedBy = [ "graphical-session.target" ];
partOf = [ "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 ]; networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
} }

View File

@ -9,8 +9,10 @@ in {
home-manager.users.moritz = { home-manager.users.moritz = {
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ]; home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
services.emacs.enable = true; services.emacs = {
services.emacs.package = emacs; enable = true;
package = emacs;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
## Emacs itself ## Emacs itself
@ -60,6 +62,10 @@ in {
# :lang python # :lang python
python-language-server python-language-server
# :email
mu
isync
]; ];
}; };
} }

View File

@ -18,5 +18,9 @@
file = ../../secrets/spotifyd.age; file = ../../secrets/spotifyd.age;
owner = "1000"; owner = "1000";
}; };
email = {
file = ../../secrets/email.age;
owner = "1000";
};
}; };
} }

12
secrets/email.age Normal file
View File

@ -0,0 +1,12 @@
age-encryption.org/v1
-> ssh-ed25519 ZYd7Zg wvi/2k5o+KRHR6Xzm5wgin2yufYKjjGSHYlEBCTc/y8
US5D1br8ojykueREHJFNgcf7JMtmqVfrN+Sa1Vge4k0
-> ssh-ed25519 wG6LYg /7dm5XhaIPvsDu55tvdUHc9tbH3k7wYSYWffduDPNSA
wBXBMF/u4F6yHBQAyCl/W4k36hxsLbP1Fc+gRp4nJYs
-> ssh-ed25519 CjuqfA vYcPVSphrt9ghQG0ylLBl8QEcKvbuigpUJtm3iUlLy8
Ehy0HPXinGoQGVy/+jHnLc4ese1W7hZg0J4+gEk5bbM
-> &yBeH5&%-grease fDn]Xtb | $&y&-)
EsEgMhctNxnM5Ri7rK44QGowx1+0ueL74CvmgkoGzvPlWEVTKYxWo3qGt/TV2d6X
X9ieZg8jOqcdAXzwjiWy9aiXp8BklMeKCHo1
--- wLPAD09HngB9TizcPxqYUmnGMVdk9EX6MCcU0yjJ+Os
0!Áÿâ ÃÇë“Am•ý¡q—{=ÌÁ·O/—λfÝ¢³2Y<>2£Uþƒí¼ñG©

View File

@ -8,11 +8,11 @@ let
nixos-desktop = nixos-desktop =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI";
hosts = [ nixos-laptop nixos-desktop ]; hosts = [ nixos-laptop nixos-desktop ];
in in {
{
"nordvpn.age".publicKeys = users ++ hosts; "nordvpn.age".publicKeys = users ++ hosts;
"davfs.age".publicKeys = users ++ hosts; "davfs.age".publicKeys = users ++ hosts;
"smbMoritz.age".publicKeys = users ++ hosts; "smbMoritz.age".publicKeys = users ++ hosts;
"smbMedia.age".publicKeys = users ++ hosts; "smbMedia.age".publicKeys = users ++ hosts;
"spotifyd.age".publicKeys = users ++ hosts; "spotifyd.age".publicKeys = users ++ hosts;
"email.age".publicKeys = users ++ hosts;
} }