From 86ae7a6243810da69ee04483a48cac17a9e49448 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Wed, 6 Mar 2024 13:35:43 -0800 Subject: Remove top level `with lib;` in docs (#293829) --- nixos/doc/manual/development/replace-modules.section.md | 3 +-- nixos/doc/manual/development/writing-modules.chapter.md | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'nixos/doc/manual/development') diff --git a/nixos/doc/manual/development/replace-modules.section.md b/nixos/doc/manual/development/replace-modules.section.md index ac9f5adbaf981..45e2adbc26088 100644 --- a/nixos/doc/manual/development/replace-modules.section.md +++ b/nixos/doc/manual/development/replace-modules.section.md @@ -47,9 +47,8 @@ without having to know its implementation details. ```nix { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) mkIf mkOption types; cfg = config.programs.man; in diff --git a/nixos/doc/manual/development/writing-modules.chapter.md b/nixos/doc/manual/development/writing-modules.chapter.md index e07b899e6df7b..20157a21e890f 100644 --- a/nixos/doc/manual/development/writing-modules.chapter.md +++ b/nixos/doc/manual/development/writing-modules.chapter.md @@ -104,9 +104,8 @@ functions system environment substitution should *not* be disabled explicitly. ```nix { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) concatStringsSep mkIf mkOption optionalString types; cfg = config.services.locate; in { options.services.locate = { @@ -163,9 +162,7 @@ in { ::: {#exec-escaping-example .example} ### Escaping in Exec directives ```nix -{ config, lib, pkgs, utils, ... }: - -with lib; +{ config, pkgs, utils, ... }: let cfg = config.services.echo; -- cgit 1.4.1