This is my flakeless configuration for macOS using nix
{ pkgs, ... }:
{
  home.packages = with pkgs; [
    scala_3
    mill
    metals
    ammonite
  ];
  programs.nixvim.plugins.lsp.servers.metals = {
    enable = true;
    package = null;
  };
}