🚀 add custom email module
parent
9c7be9b751
commit
0400e3f7bd
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
modules = {
|
||||||
|
gaming = true;
|
||||||
|
|
||||||
|
editors = {
|
||||||
|
idea = true;
|
||||||
|
code = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
desktop.apps.email = {
|
||||||
|
enable = true;
|
||||||
|
passwordFile = ../secrets/email-desktop.age;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
modules.desktop.apps.email = {
|
||||||
|
enable = true;
|
||||||
|
passwordFile = ../secrets/email-desktop.age;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,9 +1,23 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
|
cfg = config.modules.desktop.apps.email;
|
||||||
name = "Moritz Böhme";
|
name = "Moritz Böhme";
|
||||||
email = "mail@moritzboeh.me";
|
email = "mail@moritzboeh.me";
|
||||||
mailDirectory = "/home/moritz/.mail";
|
mailDirectory = "/home/moritz/.mail";
|
||||||
in {
|
in {
|
||||||
|
options.modules.desktop.apps.email = {
|
||||||
|
enable = mkEnableOption "email module";
|
||||||
|
passwordFile = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = types.path;
|
||||||
|
description = "File containing the email password.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# Protonbridge Setup
|
||||||
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";
|
||||||
|
@ -16,6 +30,12 @@ in {
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
age.secrets.email = {
|
||||||
|
file = cfg.passwordFile;
|
||||||
|
owner = "1000";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Email Applications
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
home = { packages = with pkgs; [ thunderbird ]; };
|
home = { packages = with pkgs; [ thunderbird ]; };
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -74,4 +94,5 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue