Java: Difference between revisions
imported>Nornagon Add more information about the various flavors of Java |
imported>Nornagon Add instructions for installing Oracle JDK system-wide. |
||
| Line 31: | Line 31: | ||
}; | }; | ||
}; | }; | ||
} | |||
</syntaxhighlight> | |||
To install the Oracle JRE system-wide, you need to explicitly accept the license in addition to allowing unfree modules: | |||
<syntaxhighlight lang="nix"> | |||
# /etc/nixos/configuration.nix | |||
{ | |||
nixpkgs.config = { | |||
allowUnfree = true; | |||
oraclejdk.accept_license = true; | |||
}; | |||
environment.systemPackages = with pkgs; [ | |||
oraclejre8 | |||
]; | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||