Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d56617655391
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ec145bfbddfb
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 22, 2020

  1. nixos/ssmtp: declare all option renames manually

    While renaming `networking.defaultMailServer` directly to
    `services.ssmtp` is shorter and probably clearer, it causes eval errors
    due to the second rename (directDelivery -> enable) when using e.g. `lib.mkForce`.
    
    For instance,
    
    ``` nix
    { lib, ... }: {
      networking.defaultMailServer = {
        hostName = "localhost";
        directDelivery = lib.mkForce true;
        domain = "example.org";
      };
    }
    ```
    
    would break with the following (rather confusing) error:
    
    ```
    error: The option value `services.ssmtp.enable' in `/home/ma27/Projects/nixpkgs/nixos/modules/programs/ssmtp.nix' is not of type `boolean'.
    (use '--show-trace' to show detailed location information)
    ```
    
    (cherry picked from commit fc316f7)
    Ma27 committed Mar 22, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dasJ Janne Heß
    Copy the full SHA
    ec145bf View commit details
Showing with 10 additions and 2 deletions.
  1. +10 −2 nixos/modules/programs/ssmtp.nix
12 changes: 10 additions & 2 deletions nixos/modules/programs/ssmtp.nix
Original file line number Diff line number Diff line change
@@ -14,8 +14,16 @@ in
{

imports = [
(mkRenamedOptionModule [ "networking" "defaultMailServer" ] [ "services" "ssmtp" ])
(mkRenamedOptionModule [ "services" "ssmtp" "directDelivery" ] [ "services" "ssmtp" "enable" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "directDelivery" ] [ "services" "ssmtp" "enable" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "hostName" ] [ "services" "ssmtp" "hostName" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "domain" ] [ "services" "ssmtp" "domain" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "root" ] [ "services" "ssmtp" "root" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "useTLS" ] [ "services" "ssmtp" "useTLS" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "useSTARTTLS" ] [ "services" "ssmtp" "useSTARTTLS" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "authUser" ] [ "services" "ssmtp" "authUser" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "authPass" ] [ "services" "ssmtp" "authPass" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "authPassFile" ] [ "services" "ssmtp" "authPassFile" ])
(mkRenamedOptionModule [ "networking" "defaultMailServer" "setSendmail" ] [ "services" "ssmtp" "setSendmail" ])
];

options = {