Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib, nixos: fix module aliases in presence of defaults #40418

Merged
merged 2 commits into from
Jun 27, 2018

Commits on Jun 11, 2018

  1. Configuration menu
    Copy the full SHA
    c0c43e9 View commit details
    Browse the repository at this point in the history
  2. lib: fix and simplify doRename

    Before this change `mkRenamedOptionModule` would override option defaults
    even when the old option name is left unused. For instance
    
    ```nix
    {
      optios = {
        services.name.new = mkOption {
          default = { one = {}; };
        };
      };
      imports = [
        (mkRenamedOptionModule [ "services" "name" "old" ] [ "services" "name" "new" "two" ])
      ];
      config = {};
    }
    ```
    
    would evaluate to
    
    `{ config.services.name.new = { two = {}; }; }`
    
    when you'd expect it to evaluate to
    
    `{ config.services.name.new = { one = {}; }; }`.
    oxij committed Jun 11, 2018
    Configuration menu
    Copy the full SHA
    449d43f View commit details
    Browse the repository at this point in the history