Unverified Commit e8d7a2d1 authored by Robert Hensing's avatar Robert Hensing Committed by GitHub
Browse files

Merge pull request #295020 from philiptaron/remove-top-level-with-in-lib-part4

lib/tests: remove top-level `with` in `lib/tests`
parents b9a1cf2f 20abffc0
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -6,12 +6,19 @@

{ config, lib, ... }:

with lib;
let
  inherit (lib)
    mkAliasOptionModule
    mkForce
    mkOption
    types
    ;
in

{
  options = {
    # A simple boolean option that can be enabled or disabled.
    enable = lib.mkOption {
    enable = mkOption {
      type = types.nullOr types.bool;
      default = null;
      example = true;
@@ -41,7 +48,7 @@ with lib;
    # should override the next import.
    ( { config, lib, ... }:
      {
        enableAlias = lib.mkForce false;
        enableAlias = mkForce false;
      }
    )

+10 −3
Original line number Diff line number Diff line
@@ -6,12 +6,19 @@

{ config, lib, ... }:

with lib;
let
  inherit (lib)
    mkAliasOptionModule
    mkDefault
    mkOption
    types
    ;
in

{
  options = {
    # A simple boolean option that can be enabled or disabled.
    enable = lib.mkOption {
    enable = mkOption {
      type = types.nullOr types.bool;
      default = null;
      example = true;
@@ -41,7 +48,7 @@ with lib;
    # should be able to be overridden by the next import.
    ( { config, lib, ... }:
      {
        enableAlias = lib.mkDefault false;
        enableAlias = mkDefault false;
      }
    )

+8 −1
Original line number Diff line number Diff line
@@ -2,7 +2,14 @@
, extendModules
, ...
}:
with lib;

let
  inherit (lib)
    mkOption
    mkOverride
    types
    ;
in
{
  imports = [