24 lines
733 B
Nix
24 lines
733 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.lmstudio;
|
|
lmStudio = pkgs.appimageRunner (pkgs.fetchurl {
|
|
# You should check the LM Studio website for the latest download link
|
|
url = "https://releases.lmstudio.ai/linux/x64/latest/LM_Studio-0.4.91.AppImage";
|
|
# IMPORTANT: You must update this hash whenever you change the URL
|
|
# Run `nix-prefetch-url --unpack <URL>` or just let Nix fail and provide the new hash
|
|
sha256 = "sha256-0000000000000000000000000000000000000000000=";
|
|
});
|
|
in {
|
|
options.lmstudio = {enable = mkEnableOption "is lmstudio host";};
|
|
config = mkIf cfg.enable {
|
|
services.lmstudio = {
|
|
enable = true;
|
|
environment.systemPackages = [ lmStudio ];
|
|
};
|
|
};
|
|
}
|