diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b19b7398ab78..5a356e8cfde9 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -14169,6 +14169,12 @@ githubId = 9636071; name = "Myrl Hex"; }; + mzacho = { + email = "nixpkgs@martinzacho.net"; + github = "mzacho"; + githubId = 16916972; + name = "Martin Zacho"; + }; n00b0ss = { email = "nixpkgs@n00b0ss.de"; github = "n00b0ss"; diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index a40b91d9467e..f190cad8a25b 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -81,6 +81,8 @@ - [Rathole](https://github.com/rapiz1/rathole), a lightweight and high-performance reverse proxy for NAT traversal. Available as [services.rathole](#opt-services.rathole.enable). +- [Proton Mail bridge](https://proton.me/mail/bridge), a desktop application that runs in the background, encrypting and decrypting messages as they enter and leave your computer. It lets you add your Proton Mail account to your favorite email client via IMAP/SMTP by creating a local email server on your computer. + ## Backward Incompatibilities {#sec-release-24.11-incompatibilities} - `transmission` package has been aliased with a `trace` warning to `transmission_3`. Since [Transmission 4 has been released last year](https://github.com/transmission/transmission/releases/tag/4.0.0), and Transmission 3 will eventually go away, it was decided perform this warning alias to make people aware of the new version. The `services.transmission.package` defaults to `transmission_3` as well because the upgrade can cause data loss in certain specific usage patterns (examples: [#5153](https://github.com/transmission/transmission/issues/5153), [#6796](https://github.com/transmission/transmission/issues/6796)). Please make sure to back up to your data directory per your usage: diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 1dae3e6f07c6..599ea640f67c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -674,6 +674,7 @@ ./services/mail/postfixadmin.nix ./services/mail/postgrey.nix ./services/mail/postsrsd.nix + ./services/mail/protonmail-bridge.nix ./services/mail/public-inbox.nix ./services/mail/roundcube.nix ./services/mail/rspamd.nix diff --git a/nixos/modules/services/mail/protonmail-bridge.nix b/nixos/modules/services/mail/protonmail-bridge.nix new file mode 100644 index 000000000000..da58d9731f04 --- /dev/null +++ b/nixos/modules/services/mail/protonmail-bridge.nix @@ -0,0 +1,60 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.services.protonmail-bridge; +in +{ + options.services.protonmail-bridge = { + enable = lib.mkEnableOption "protonmail bridge"; + + package = lib.mkPackageOption pkgs "protonmail-bridge" { }; + + path = lib.mkOption { + type = lib.types.listOf lib.types.path; + default = [ ]; + example = lib.literalExpression "with pkgs; [ pass gnome-keyring ]"; + description = "List of derivations to put in protonmail-bride's path."; + }; + + logLevel = lib.mkOption { + type = lib.types.nullOr ( + lib.types.enum [ + "panic" + "fatal" + "error" + "warn" + "info" + "debug" + ] + ); + default = null; + description = "Log level of the Proton Mail Bridge service. If set to null then the service uses it's default log level."; + }; + }; + + config = lib.mkIf cfg.enable { + systemd.user.services.protonmail-bridge = { + description = "protonmail bridge"; + wantedBy = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + + serviceConfig = + let + logLevel = lib.optionalString (cfg.logLevel != null) "--log-level ${cfg.logLevel}"; + in + { + ExecStart = "${lib.getExe cfg.package} --noninteractive ${logLevel}"; + Restart = "always"; + }; + + path = cfg.path; + }; + environment.systemPackages = [ cfg.package ]; + }; + meta.maintainers = with lib.maintainers; [ mzacho ]; +}