diff --git a/modules/programs/java.nix b/modules/programs/java.nix index 24467a255..d10f64c54 100644 --- a/modules/programs/java.nix +++ b/modules/programs/java.nix @@ -36,6 +36,8 @@ in { config = mkIf cfg.enable { home.packages = [ cfg.package ]; - home.sessionVariables.JAVA_HOME = cfg.package.home; + # some instances of `jdk-linux-base.nix` pass through `result` without turning it onto a path-string. + # while I suspect this is incorrect, the documentation is unclear. + home.sessionVariables.JAVA_HOME = "${cfg.package.home}"; }; }