treewide: remove file-wide with lib; in nixos/modules/programs

This commit is contained in:
Acid Bong 2024-04-17 14:37:58 +03:00
parent 861f29655c
commit 49f6869f71
No known key found for this signature in database
118 changed files with 1053 additions and 1269 deletions

View file

@ -3,8 +3,6 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.java;
in
@ -14,7 +12,7 @@ in
programs.java = {
enable = mkEnableOption "java" // {
enable = lib.mkEnableOption "java" // {
description = ''
Install and setup the Java development kit.
@ -30,19 +28,19 @@ in
'';
};
package = mkPackageOption pkgs "jdk" {
package = lib.mkPackageOption pkgs "jdk" {
example = "jre";
};
binfmt = mkEnableOption "binfmt to execute java jar's and classes";
binfmt = lib.mkEnableOption "binfmt to execute java jar's and classes";
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
boot.binfmt.registrations = mkIf cfg.binfmt {
boot.binfmt.registrations = lib.mkIf cfg.binfmt {
java-class = {
recognitionType = "extension";
magicOrExtension = "class";