users/foo-dogsquared: update email, Git, and Doom Emacs config

This commit is contained in:
Gabriel Arazas 2024-11-19 20:39:04 +08:00
parent d3d53f3146
commit 024f27aca5
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
3 changed files with 47 additions and 40 deletions

View File

@ -83,7 +83,7 @@ in
xdg.desktopEntries.org-protocol = { xdg.desktopEntries.org-protocol = {
name = "Org protocol"; name = "Org protocol";
exec = "emacsclient %u"; exec = "emacsclient %u";
icon = "emacs-icon"; icon = "emacs";
mimeType = [ "x-scheme-handler/org-protocol" ]; mimeType = [ "x-scheme-handler/org-protocol" ];
}; };

View File

@ -3,6 +3,27 @@
let let
userCfg = config.users.foo-dogsquared; userCfg = config.users.foo-dogsquared;
cfg = userCfg.programs.email; cfg = userCfg.programs.email;
mkEmailAccount = { domain ? "foodogsquared.one", name }: {
thunderbird.enable = lib.mkDefault true;
address = "${name}@${domain}";
userName = "${name}@${domain}";
realName = lib.mkDefault "${name}@${domain}";
passwordCommand = lib.mkDefault "gopass show email/${domain}/${name} | head -n 1";
imap = {
host = "heracles.mxrouting.net";
port = 993;
tls.enable = true;
};
# Set up the outgoing mails.
smtp = {
host = "heracles.mxrouting.net";
port = 465;
tls.enable = true;
};
};
in in
{ {
options.users.foo-dogsquared.programs.email = { options.users.foo-dogsquared.programs.email = {
@ -14,53 +35,39 @@ in
{ {
accounts.email.accounts = { accounts.email.accounts = {
# TODO: Enable offlineimap once maildir support is stable in Thunderbird. # TODO: Enable offlineimap once maildir support is stable in Thunderbird.
personal = { personal = lib.mkMerge [
address = "foodogsquared@foodogsquared.one"; (mkEmailAccount { name = "foodogsquared"; })
aliases = [
"admin@foodogsquared.one"
"webmaster@foodogsquared.one"
"hostmaster@foodogsquared.one"
"postmaster@foodogsquared.one"
];
primary = true;
realName = "Gabriel Arazas";
userName = "foodogsquared@mailbox.org";
signature = {
delimiter = "--<----<---->---->--";
text = ''
foodogsquared at foodogsquared dot one
'';
};
passwordCommand = "gopass show personal/websites/mailbox.org/foodogsquared@mailbox.org | head -n 1";
# Set up the ingoing mails. {
imap = { thunderbird.enable = true;
host = "imap.mailbox.org"; primary = true;
port = 993; realName = "Gabriel Arazas";
tls.enable = true; signature = {
}; delimiter = "--<----<---->---->--";
text = ''
foodogsquared at foodogsquared dot one
'';
};
# Set up the outgoing mails. # GPG settings... wablamo.
smtp = { gpg = {
host = "smtp.mailbox.org"; key = "0xADE0C41DAB221FCC";
port = 465; encryptByDefault = false;
tls.enable = true; signByDefault = false;
}; };
}
];
# GPG settings... wablamo. postmaster = mkEmailAccount { name = "postmaster"; };
gpg = { webmaster = mkEmailAccount { name = "webmaster"; };
key = "0xADE0C41DAB221FCC";
encryptByDefault = false;
signByDefault = false;
};
};
old_personal = { old_personal = {
thunderbird.enable = true;
address = "foo.dogsquared@gmail.com"; address = "foo.dogsquared@gmail.com";
realName = config.accounts.email.accounts.personal.realName; realName = config.accounts.email.accounts.personal.realName;
userName = "foo.dogsquared@gmail.com"; userName = "foo.dogsquared@gmail.com";
flavor = "gmail.com"; flavor = "gmail.com";
passwordCommand = "gopass show personal/websites/accounts.google.com/foo.dogsquared | head -n 1"; passwordCommand = "gopass show websites/accounts.google.com/foo.dogsquared | head -n 1";
}; };
}; };
} }

View File

@ -26,7 +26,7 @@ in
lfs.enable = true; lfs.enable = true;
signing.key = "4AA9CDFF7C99DFF9"; signing.key = "4AA9CDFF7C99DFF9";
extraConfig = { extraConfig = {
core.excludesFile = ../../config/git/ignore; core.excludesFile = builtins.toString ../../config/git/ignore;
user = { user = {
name = config.accounts.email.accounts.personal.realName; name = config.accounts.email.accounts.personal.realName;