mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
treewide: remove file-wide with lib;
in nixos/modules/programs
This commit is contained in:
parent
861f29655c
commit
49f6869f71
118 changed files with 1053 additions and 1269 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue