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,8 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (lib) mkIf types;
cfg = config.programs.z-lua;
@ -18,9 +16,9 @@ in {
meta.maintainers = [ ];
options.programs.z-lua = {
enable = mkEnableOption "z.lua";
enable = lib.mkEnableOption "z.lua";
options = mkOption {
options = lib.mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "enhanced" "once" "fzf" ];
@ -38,7 +36,7 @@ in {
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
enableAliases = mkOption {
enableAliases = lib.mkOption {
default = false;
type = types.bool;
description = ''
@ -52,13 +50,13 @@ in {
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
eval "$(${pkgs.z-lua}/bin/z --init bash ${
concatStringsSep " " cfg.options
lib.concatStringsSep " " cfg.options
})"
'';
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
eval "$(${pkgs.z-lua}/bin/z --init zsh ${
concatStringsSep " " cfg.options
lib.concatStringsSep " " cfg.options
})"
'';
@ -66,11 +64,11 @@ in {
programs.zsh.shellAliases = mkIf cfg.enableAliases aliases;
programs.fish = mkMerge [
programs.fish = lib.mkMerge [
{
shellInit = mkIf cfg.enableFishIntegration ''
source (${pkgs.z-lua}/bin/z --init fish ${
concatStringsSep " " cfg.options
lib.concatStringsSep " " cfg.options
} | psub)
'';
}