✨ rework email module
This commit is contained in:
parent
fff714f7aa
commit
aa42f6678e
10 changed files with 27 additions and 80 deletions
|
@ -14,12 +14,6 @@
|
||||||
# KERNEL
|
# KERNEL
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# MY MODULES
|
|
||||||
my.email = {
|
|
||||||
enable = true;
|
|
||||||
passwordFile = ../../secrets/email-desktop.age;
|
|
||||||
};
|
|
||||||
|
|
||||||
# BOOT
|
# BOOT
|
||||||
boot = {
|
boot = {
|
||||||
supportedFilesystems = [ "btrfs" "ntfs" ];
|
supportedFilesystems = [ "btrfs" "ntfs" ];
|
||||||
|
|
|
@ -11,12 +11,6 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# MY MODULES
|
|
||||||
my.email = {
|
|
||||||
enable = true;
|
|
||||||
passwordFile = ../../secrets/email-desktop.age;
|
|
||||||
};
|
|
||||||
|
|
||||||
# BOOT
|
# BOOT
|
||||||
boot = {
|
boot = {
|
||||||
supportedFilesystems = [ "btrfs" ];
|
supportedFilesystems = [ "btrfs" ];
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./bin
|
./bin
|
||||||
./email.nix
|
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./shell.nix
|
./shell.nix
|
||||||
./theming
|
./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;
|
bspwm.enable = true;
|
||||||
code.enable = true;
|
code.enable = true;
|
||||||
emacs.enable = true;
|
emacs.enable = true;
|
||||||
|
email.enable = true;
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
arkenfox = {
|
arkenfox = {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
./code.nix
|
./code.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./emacs.nix
|
./emacs.nix
|
||||||
|
./email.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./git.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 ];
|
||||||
|
};
|
||||||
|
}
|
Binary file not shown.
|
@ -1,15 +0,0 @@
|
||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 CjuqfA 42ZhJgcVV9rxkVmvEj4aCeeVx4Tldtx2L54hS1mZCxE
|
|
||||||
dqSOKoGxChgMHmiY4SgoJqxH9nSGlLVnmbke2+xZHYA
|
|
||||||
-> ssh-ed25519 QRYDmg yHGmTle30O7BQ7SFG7m5gaZctmwT26LNfJPbocs1WTM
|
|
||||||
lQZa4yp8R8UZpG+/JGuZ4z4gxlGXColGCs8qlKFyCP4
|
|
||||||
-> ssh-ed25519 wG6LYg wokwDVXoQaZlpX4qM/2OmSo9lbDFIqqg/dKesIETJBI
|
|
||||||
0MBgUClVsQksxRCa4WhSvQlzZRl673CZeeP7PVfHtCI
|
|
||||||
-> ssh-ed25519 ZYd7Zg cGYmLN+nSv5NGR+HMbofhtzbmZ/LjftCpcUIbZ5Z+hY
|
|
||||||
3u9UgW7TDWX+dfuJuIwRxSkwTOLrUw1znEkU9ao5Ltw
|
|
||||||
-> ssh-ed25519 as9VYQ dK/VaOUKsr58sTfiF3qjUPHi3mxfioW5IXkyMmx+xCY
|
|
||||||
mTF8kUni1pxBrcE+j4mHZx/Zs8D8SgqWjfRkDH66m5k
|
|
||||||
-> Pzw,"-grease R`h7fZ+ 'U[<2@ `Ay6[
|
|
||||||
3a6T
|
|
||||||
--- I5udQOeevThPQ3VGfarWDe+n1y1DnC1vNqd+hU53ENw
|
|
||||||
¶Ç»–·<E28093>@ŠÅC¶þ¢ ˜ÉÿwWÛøLouåsº»¾Ý
f½zÐëb+Ùû÷“4’ÿŒ
|
|
|
@ -13,8 +13,6 @@ in
|
||||||
{
|
{
|
||||||
"nordvpn.age".publicKeys = all;
|
"nordvpn.age".publicKeys = all;
|
||||||
"spotifyd.age".publicKeys = all;
|
"spotifyd.age".publicKeys = all;
|
||||||
"email-desktop.age".publicKeys = all;
|
|
||||||
"email-laptop.age".publicKeys = all;
|
|
||||||
"home-vpn.age".publicKeys = all;
|
"home-vpn.age".publicKeys = all;
|
||||||
"home-vpn-password.age".publicKeys = all;
|
"home-vpn-password.age".publicKeys = all;
|
||||||
"github.age".publicKeys = all;
|
"github.age".publicKeys = all;
|
||||||
|
|
Loading…
Reference in a new issue