Move email into options
This commit is contained in:
parent
089474efee
commit
661701dcc9
|
@ -5,6 +5,7 @@
|
|||
./common-x86
|
||||
./data-share
|
||||
./docker
|
||||
./email
|
||||
./eog
|
||||
./lockscreen
|
||||
./makemkv
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${inputs.self}/modules/email"
|
||||
"${inputs.self}/modules/hunspell"
|
||||
"${inputs.self}/modules/libimobiledevice"
|
||||
"${inputs.self}/modules/nix-direnv"
|
||||
|
@ -48,12 +47,14 @@
|
|||
# Enable sound.
|
||||
sound.enable = true;
|
||||
|
||||
# Enable dconf to be able to save Nautilus settings
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Gnome Image Viewer
|
||||
programs.az-eog.enable = true;
|
||||
programs = {
|
||||
# Enable dconf to be able to save Nautilus settings
|
||||
dconf.enable = true;
|
||||
|
||||
az-email.enable = true;
|
||||
# Gnome Image Viewer
|
||||
az-eog.enable = true;
|
||||
};
|
||||
# Enable Flatpack
|
||||
services.flatpak.enable = true;
|
||||
|
||||
|
|
|
@ -1,46 +1,55 @@
|
|||
{ config, inputs, ... }:
|
||||
{ config, inputs, lib, ... }:
|
||||
let
|
||||
cfg = config.programs.az-email;
|
||||
in
|
||||
{
|
||||
age.secrets.personalEmailKey =
|
||||
{
|
||||
file = "${inputs.self}/scrts/personal_email.key.age";
|
||||
mode = "600";
|
||||
owner = config.az-username;
|
||||
group = "users";
|
||||
};
|
||||
options = {
|
||||
programs.az-email.enable = lib.mkEnableOption "DESCRIPTION";
|
||||
};
|
||||
|
||||
home-manager.users.${config.az-username} = {
|
||||
accounts.email.accounts."personal" = {
|
||||
address = "andreas@zweili.ch";
|
||||
realName = "Andreas Zweili";
|
||||
userName = "andreas@zweili.ch";
|
||||
primary = true;
|
||||
passwordCommand = "cat ${config.age.secrets.personalEmailKey.path}";
|
||||
aliases = [
|
||||
"andreas.zweili@gmail.com"
|
||||
"andreas@2li.ch"
|
||||
];
|
||||
msmtp.enable = true;
|
||||
mu.enable = true;
|
||||
offlineimap = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
account = { autorefresh = 15; };
|
||||
local = { sync_deletes = true; };
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets.personalEmailKey =
|
||||
{
|
||||
file = "${inputs.self}/scrts/personal_email.key.age";
|
||||
mode = "600";
|
||||
owner = config.az-username;
|
||||
group = "users";
|
||||
};
|
||||
|
||||
home-manager.users.${config.az-username} = {
|
||||
accounts.email.accounts."personal" = {
|
||||
address = "andreas@zweili.ch";
|
||||
realName = "Andreas Zweili";
|
||||
userName = "andreas@zweili.ch";
|
||||
primary = true;
|
||||
passwordCommand = "cat ${config.age.secrets.personalEmailKey.path}";
|
||||
aliases = [
|
||||
"andreas.zweili@gmail.com"
|
||||
"andreas@2li.ch"
|
||||
];
|
||||
msmtp.enable = true;
|
||||
mu.enable = true;
|
||||
offlineimap = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
account = { autorefresh = 15; };
|
||||
local = { sync_deletes = true; };
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mail.zweili.org";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
host = "mail.zweili.org";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mail.zweili.org";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
host = "mail.zweili.org";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
programs.mu.enable = true;
|
||||
programs.offlineimap.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
};
|
||||
programs.mu.enable = true;
|
||||
programs.offlineimap.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue