✨ rework email module
This commit is contained in:
parent
fff714f7aa
commit
aa42f6678e
10 changed files with 27 additions and 80 deletions
|
|
@ -7,7 +7,6 @@
|
|||
{
|
||||
imports = [
|
||||
./bin
|
||||
./email.nix
|
||||
./nix.nix
|
||||
./shell.nix
|
||||
./theming
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.email;
|
||||
name = "Moritz Böhme";
|
||||
email = "mail@moritzboeh.me";
|
||||
mailDirectory = "/home/moritz/.mail";
|
||||
in
|
||||
{
|
||||
options.my.email = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
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 ];
|
||||
systemd.user.services.protonmail-bridge = {
|
||||
description = "Protonmail Bridge";
|
||||
enable = true;
|
||||
script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug";
|
||||
path = [
|
||||
pkgs.gnome3.gnome-keyring
|
||||
]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
};
|
||||
age.secrets.email = {
|
||||
file = cfg.passwordFile;
|
||||
owner = "1000";
|
||||
};
|
||||
|
||||
# Email Applications
|
||||
home-manager.users.moritz.home.packages = with pkgs; [ thunderbird ];
|
||||
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ with lib; {
|
|||
bspwm.enable = true;
|
||||
code.enable = true;
|
||||
emacs.enable = true;
|
||||
email.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
arkenfox = {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
./code.nix
|
||||
./direnv.nix
|
||||
./emacs.nix
|
||||
./email.nix
|
||||
./firefox.nix
|
||||
./fish.nix
|
||||
./git.nix
|
||||
|
|
|
|||
25
modules/programs/email.nix
Normal file
25
modules/programs/email.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.email;
|
||||
in
|
||||
{
|
||||
options.my.programs.email = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Email Applications
|
||||
users.users.moritz.packages = with pkgs; [ thunderbird ];
|
||||
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue