treewide: remove with lib (#6735)

Continuation of `with lib;` cleanup.
This commit is contained in:
Austin Horstman 2025-03-31 22:32:16 -05:00 committed by GitHub
parent ccd7df836e
commit 0b491b460f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
200 changed files with 2421 additions and 2817 deletions

View file

@ -1,9 +1,6 @@
# Adapted from Nixpkgs.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.command-not-found;
commandNotFound = pkgs.substituteAll {
@ -31,9 +28,9 @@ let
in {
options.programs.command-not-found = {
enable = mkEnableOption "command-not-found hook for interactive shell";
enable = lib.mkEnableOption "command-not-found hook for interactive shell";
dbPath = mkOption {
dbPath = lib.mkOption {
default =
"/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite";
description = ''
@ -41,11 +38,11 @@ in {
default this file will be provided by your channel
(nixexprs.tar.xz).
'';
type = types.path;
type = lib.types.path;
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
programs.bash.initExtra = shInit "command_not_found_handle";
programs.zsh.initContent = shInit "command_not_found_handler";