feat(email): better email configuration
This commit is contained in:
commit
32039cd82c
@ -29,32 +29,6 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.mbsync.unitConfig.After = ["sops-nix.service"];
|
||||
services.mbsync.enable = cfg.service.enable;
|
||||
programs.mbsync = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
IMAPAccount Main
|
||||
Host ${cfg.host}
|
||||
User ${cfg.user}
|
||||
PassCmd "cat ${cfg.passwordFile}"
|
||||
SSLType IMAPS
|
||||
SSLVersion TLSv1.2
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
IMAPStore main-remote
|
||||
Account Main
|
||||
|
||||
MaildirStore main-local
|
||||
Subfolders Verbatim
|
||||
Path ~/Mail/
|
||||
Inbox ~/Mail/Inbox
|
||||
|
||||
Channel main
|
||||
Far :main-remote:
|
||||
Near :main-local:
|
||||
Create Both
|
||||
SyncState *
|
||||
Patterns *
|
||||
'';
|
||||
};
|
||||
programs.mbsync.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -68,15 +68,6 @@ in {
|
||||
sha256 = "sha256-q26XVS/LcyZPRqDNwKKA9exgBByE0muyuNb0Bbar2lY=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "auto-notify";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "MichaelAquilina";
|
||||
repo = "zsh-auto-notify";
|
||||
rev = "0.11.0";
|
||||
sha256 = "sha256-8r5RsyldJIzlWr9+G8lrkHvJ8KxTVO859M//wDnYOUY=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
|
@ -1,116 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./light-home.nix
|
||||
./packages.nix
|
||||
../modules/emacs.nix
|
||||
../modules/kdeconnect.nix
|
||||
../modules/kitty.nix
|
||||
../modules/hyprland.nix
|
||||
../modules/mbsync.nix
|
||||
../modules/mpd.nix
|
||||
../modules/mpv.nix
|
||||
../modules/wofi.nix
|
||||
../modules/yt-dlp.nix
|
||||
../modules/emoji.nix
|
||||
../modules/qt.nix
|
||||
];
|
||||
|
||||
config = let
|
||||
emacsPkg = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (
|
||||
epkgs: [
|
||||
epkgs.vterm
|
||||
epkgs.mu4e
|
||||
epkgs.pdf-tools
|
||||
]
|
||||
));
|
||||
askpass = import ../scripts/askpass.nix {inherit pkgs;};
|
||||
launchWithEmacsclient = import ../scripts/launch-with-emacsclient.nix {
|
||||
inherit pkgs;
|
||||
emacsPackage = emacsPkg;
|
||||
};
|
||||
in {
|
||||
sops.secrets = {
|
||||
emailPassword = {};
|
||||
"mopidy/bandcamp" = {};
|
||||
"mopidy/spotify" = {};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "${emacsPkg}/bin/emacsclient -c -a ${emacsPkg}/bin/emacs";
|
||||
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
|
||||
SUDO_ASKPASS = "${askpass}/bin/askpass";
|
||||
LSP_USE_PLISTS = "true";
|
||||
};
|
||||
|
||||
modules = {
|
||||
shell.starship.jjIntegration = true;
|
||||
bat.extras = true;
|
||||
packages.emacsPackage = emacsPkg;
|
||||
mopidy.enable = true;
|
||||
|
||||
emacs = {
|
||||
enable = true;
|
||||
service = true;
|
||||
package = emacsPkg;
|
||||
};
|
||||
hyprland = {
|
||||
inherit emacsPkg;
|
||||
enable = true;
|
||||
swaync = true;
|
||||
waybar = {
|
||||
enable = true;
|
||||
battery = false;
|
||||
style = ./config/waybar/style.css;
|
||||
};
|
||||
};
|
||||
mbsync = {
|
||||
enable = true;
|
||||
passwordFile = config.sops.secrets.emailPassword.path;
|
||||
};
|
||||
ssh = {
|
||||
enable = true;
|
||||
hosts = config.sops.secrets."ssh/hosts".path;
|
||||
};
|
||||
vcs.git = {
|
||||
browser = "${inputs.zen-browser.packages.${pkgs.system}.default}/bin/zen";
|
||||
emacs = {
|
||||
integration = true;
|
||||
pkg = emacsPkg;
|
||||
};
|
||||
sendmail = {
|
||||
enable = true;
|
||||
passwordFile = config.sops.secrets.emailPassword.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh.enableVteIntegration = true;
|
||||
mu.enable = true;
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
obs-studio-plugins.input-overlay
|
||||
obs-studio-plugins.obs-backgroundremoval
|
||||
obs-studio-plugins.obs-mute-filter
|
||||
obs-studio-plugins.obs-pipewire-audio-capture
|
||||
obs-studio-plugins.obs-source-clone
|
||||
obs-studio-plugins.obs-source-record
|
||||
obs-studio-plugins.obs-tuna
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
mpris-proxy.enable = true;
|
||||
playerctld.enable = true;
|
||||
};
|
||||
|
||||
manual.html.enable = true;
|
||||
};
|
||||
}
|
37
users/phundrak/email.nix
Normal file
37
users/phundrak/email.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{config, ...}: {
|
||||
accounts.email = {
|
||||
maildirBasePath = "Mail";
|
||||
accounts."lucien@phundrak.com" = {
|
||||
realName = "Lucien Cartier-Tilet";
|
||||
address = "lucien@phundrak.com";
|
||||
aliases = [
|
||||
"lucien@cartier-tilet.com"
|
||||
"admin@phundrak.com"
|
||||
"webmaster@phundrak.com"
|
||||
"youdontknow@phundrak.com"
|
||||
];
|
||||
passwordCommand = "cat ${config.sops.secrets.emailPassword.path}";
|
||||
signature = {
|
||||
text = ''
|
||||
Lucien “Phundrak” Cartier-Tilet
|
||||
https://phundrak.com (Français)
|
||||
https://phundrak.com/en (English)
|
||||
Sent from GNU/Emacs
|
||||
'';
|
||||
showSignature = "append";
|
||||
};
|
||||
userName = "lucien@phundrak.com";
|
||||
imap.host = "mail.phundrak.com";
|
||||
smtp.host = "mail.phundrak.com";
|
||||
mu.enable = true;
|
||||
primary = true;
|
||||
|
||||
mbsync = {
|
||||
create = "maildir";
|
||||
enable = true;
|
||||
expunge = "both";
|
||||
remove = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
imports = [
|
||||
./light-home.nix
|
||||
./packages.nix
|
||||
./email.nix
|
||||
../modules/emacs.nix
|
||||
../modules/kdeconnect.nix
|
||||
../modules/kitty.nix
|
||||
|
Loading…
x
Reference in New Issue
Block a user