task | add support for lmstudio as an optional build item

This commit is contained in:
Don Harper 2026-04-08 07:21:29 -05:00
parent bc30c3ad1d
commit 9ae83b136b
3 changed files with 4 additions and 11 deletions

View file

@ -28,6 +28,7 @@
gnome-calendar.enable = true;
};
primary.enable = false;
lmstudio.enable = true;
ollama.enable = true;
wm = {sway.enable = true;};
}

View file

@ -48,6 +48,7 @@ in {
./detect-reboot-needed.nix
./kmscon.nix
./ollama.nix
./lmstudio.nix
./systemd.nix
../systemd-primary.nix
./auto-cpufreq.nix
@ -263,6 +264,7 @@ in {
};
hardware = {
graphics = {enable = true; };
bluetooth = {enable = true;};
sane = {
enable = true;

View file

@ -6,19 +6,9 @@
}:
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 ];
};
environment.systemPackages = [ pkgs.lmstudio ];
};
}