Skip to content

Conversation

6543
Copy link
Member

@6543 6543 commented Jun 3, 2025

make it easyer to config mail for nextcloud and also be able to inject the secret as passFile:

from

settings = {
  # ...
  mail_smtpmode = "smtp";
  mail_smtpsecure = "ssl";
  mail_sendmailmode = "smtp";
  mail_from_address = "cloud";
  mail_domain = "example.com";
  mail_smtphost = "example.com";
  mail_smtpport = 465;
  mail_smtpauth = 1;
  mail_smtpname = "cloud_service@example.com";
  mail_smtppassword = "sehr geheim";
};

to:

config = {
  # ...
  mail = {
    mode = "smtp";
    secure = true;
    host = "example.com";
    domain = "example.com";
    fromAddress = "cloud";
    user = "cloud_service@example.com";
    passFile = "/var/secrets/nextcloud-smtp-password";
  };
};

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 3, 2025
@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 4, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 26, 2025
make it easyer to config and also be able to inject the secret as passwordFile
@6543 6543 force-pushed the nextcloud_mail-smtppassword_secretFromFile branch from 3b25a8c to d79716b Compare August 6, 2025 15:32
@6543 6543 requested a review from provokateurin August 6, 2025 15:35
@nixpkgs-ci nixpkgs-ci bot removed 2.status: merge conflict This PR has merge conflicts with the target branch 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 6, 2025
@provokateurin
Copy link
Member

Can you add a test? A good way to trigger an email would be to create a share where the recipient is an email address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants