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,20 +1,16 @@
# This module provides JAVA_HOME, with a different way to install java locally.
# This module is modified from the NixOS module `programs.java`
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.java;
in {
meta.maintainers = with maintainers; [ ShamrockLee ];
meta.maintainers = with lib.maintainers; [ ShamrockLee ];
options = {
programs.java = {
enable = mkEnableOption "" // {
enable = lib.mkEnableOption "" // {
description = ''
Install the Java development kit and set the
{env}`JAVA_HOME` variable.
@ -28,7 +24,7 @@ in {
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
# some instances of `jdk-linux-base.nix` pass through `result` without turning it onto a path-string.