home/email: init
This commit is contained in:
126
home/email.nix
Normal file
126
home/email.nix
Normal file
@@ -0,0 +1,126 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.accounts.email;
|
||||
in
|
||||
{
|
||||
sops.secrets = {
|
||||
"email/naniwtf/password" = { };
|
||||
"email/kyoto-u/password" = { };
|
||||
"email/pvv/password" = { };
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "mail";
|
||||
accounts = {
|
||||
"naniwtf" = let
|
||||
userName = "h7x4";
|
||||
domain = "nani.wtf";
|
||||
in {
|
||||
primary = true;
|
||||
|
||||
userName = "${userName}@${domain}";
|
||||
realName = "h7x4";
|
||||
address = "${userName}@${domain}";
|
||||
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${config.sops.secrets."email/naniwtf/password".path}";
|
||||
|
||||
imap = {
|
||||
host = "redbull.mxrouting.net";
|
||||
port = 993;
|
||||
authentication = "plain";
|
||||
tls.enable = true;
|
||||
};
|
||||
|
||||
smtp = {
|
||||
host = "redbull.mxrouting.net";
|
||||
port = 465;
|
||||
authentication = "plain";
|
||||
tls.enable = true;
|
||||
};
|
||||
|
||||
gpg = {
|
||||
key = "46B9228E814A2AAC";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
neomutt.enable = true;
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
|
||||
"pvv" = let
|
||||
userName = "oysteikt";
|
||||
domain = "pvv.ntnu.no";
|
||||
in {
|
||||
inherit userName;
|
||||
realName = "Øystein K Tveit";
|
||||
address = "${userName}@${domain}";
|
||||
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${config.sops.secrets."email/pvv/password".path}";
|
||||
|
||||
imap = {
|
||||
host = "imap.${domain}";
|
||||
port = 993;
|
||||
authentication = "plain";
|
||||
tls.enable = true;
|
||||
};
|
||||
|
||||
smtp = {
|
||||
host = "redbull.mxrouting.net";
|
||||
port = 587;
|
||||
authentication = "plain";
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
|
||||
gpg = {
|
||||
key = "";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
neomutt.enable = true;
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
|
||||
"kyoto-u" = let
|
||||
userName = "oysteikt";
|
||||
domain = "fos.kuis.kyoto-u.ac.jp";
|
||||
in {
|
||||
inherit userName;
|
||||
realName = "トバイト、オースティン";
|
||||
address = "${userName}@${domain}";
|
||||
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${config.sops.secrets."email/kyoto-u/password".path}";
|
||||
|
||||
imap = {
|
||||
host = "io.kuis.kyoto-u.ac.jp";
|
||||
port = 993;
|
||||
authentication = "plain";
|
||||
tls.enable = true;
|
||||
};
|
||||
|
||||
smtp = {
|
||||
host = "io.kuis.kyoto-u.ac.jp";
|
||||
port = 587;
|
||||
authentication = "plain";
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
|
||||
# gpg = {
|
||||
|
||||
# };
|
||||
|
||||
neomutt.enable = true;
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.settings."10-maildir" = lib.mkIf (lib.any (acct: acct.enable) (lib.attrValues cfg.accounts)) {
|
||||
"${config.home.homeDirectory}/${cfg.maildirBasePath}".d = {
|
||||
mode = "0700";
|
||||
user = config.home.username;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -3,9 +3,10 @@
|
||||
graphics = !machineVars.headless;
|
||||
in {
|
||||
imports = [
|
||||
./shell.nix
|
||||
./packages.nix
|
||||
./breakerbox.nix
|
||||
./email.nix
|
||||
./packages.nix
|
||||
./shell.nix
|
||||
|
||||
./config/xdg
|
||||
./config/ensure-homedir-structure.nix
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
ssh:
|
||||
secret-config: ""
|
||||
email:
|
||||
naniwtf:
|
||||
password: ENC[AES256_GCM,data:nQIGNNY+mU4Lh/oKCW88qVXg,iv:okMWTJulAaoCY0kT0YSSnQwAU+OlepIFpYwHp2YXdIc=,tag:ew+tZkfO4AvchWA03NIzFA==,type:str]
|
||||
kyoto-u:
|
||||
password: ENC[AES256_GCM,data:PFl/aAT99l8=,iv:QZLAPUeRfa8dslMJGkHV5uIiYpwaPyhNmN1Uj9qVNSA=,tag:+/BTehjU5gJ3ejxeI1ukAQ==,type:str]
|
||||
pvv:
|
||||
password: ENC[AES256_GCM,data:436MHS+IQug=,iv:2wQ3Vu/NiWF/tf0rv5mHz3dqRGxM/TGvYINHzQLXri4=,tag:dIDHgS90g5MQ0wU9QWXuyw==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age10f4a5acpar8vwz3v298r3nv7gggfpmyh4wxpkc2hwq9paq0scf8qee8lau
|
||||
@@ -20,8 +27,8 @@ sops:
|
||||
UDBQRkFtTzYveU9Cc3dYVjQyMVJQUjgKu2zXnw1OCUPW/4/colAqdzU4TUAHZqFd
|
||||
s4n79dNnTxp4AnhN3UWpN6kUWIOkezVqXPFAz+bQcglZOm6gmBEJow==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-22T12:18:45Z"
|
||||
mac: ENC[AES256_GCM,data:HFfFeeGFDo2XryyTbyqUXG9rUZhGgmWggByDHnQLghrg6NHyP3ZX/Y1vE30qNJTtXLdYvUK336xi9AFlLXjwrWx0+ggmaxPOYz/698NgNh4jUIrNhVmCw6kGBeEbyNJacNZdUMiY0jbK6r5+Xu5HI3hLoxR5Ft1PzRwZCQ2ypXY=,iv:MY3lwcV4vNC+fDSnzzabxY4jpcdBzXIPwjdOrh62jzc=,tag:v/of31Bul7CiANiAF4oHLg==,type:str]
|
||||
lastmodified: "2026-02-06T03:10:26Z"
|
||||
mac: ENC[AES256_GCM,data:3+d1SwLx5uEiGmhRZ+Qn3UMRT604X3/6lnuhTkv9v0J3Sa95llALmba3nldHzxYTwIu5FUpNwdvT3qdYPot+6C+Al8Y3MC4LiBqqBPKeQ+kfpWEN/VTX40MoF0YLMEew0Ge0jx0WEx/V31XJA8lfbkDV9ItwRcc79ms/tBrW2MM=,iv:jQDJeLHqywuJ099vnGJiMXb5RUhX/Iwo4nqeecHKWG0=,tag:d1d/N4HK8k2QxGlUv+ImZg==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-04-02T10:09:10Z"
|
||||
enc: |-
|
||||
@@ -44,4 +51,4 @@ sops:
|
||||
-----END PGP MESSAGE-----
|
||||
fp: F7D37890228A907440E1FD4846B9228E814A2AAC
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
version: 3.11.0
|
||||
|
||||
Reference in New Issue
Block a user