From 9ae83b136b48b802390c9a8f2c917a252aea6225 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Wed, 8 Apr 2026 07:21:29 -0500 Subject: [PATCH] task | add support for lmstudio as an optional build item --- hosts/loki/default.nix | 1 + hosts/workstation/default.nix | 2 ++ hosts/workstation/lmstudio.nix | 12 +----------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index b5bc22e..29fdbaa 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -28,6 +28,7 @@ gnome-calendar.enable = true; }; primary.enable = false; + lmstudio.enable = true; ollama.enable = true; wm = {sway.enable = true;}; } diff --git a/hosts/workstation/default.nix b/hosts/workstation/default.nix index e69ec2c..668ef9e 100644 --- a/hosts/workstation/default.nix +++ b/hosts/workstation/default.nix @@ -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; diff --git a/hosts/workstation/lmstudio.nix b/hosts/workstation/lmstudio.nix index 9c55369..85984cf 100644 --- a/hosts/workstation/lmstudio.nix +++ b/hosts/workstation/lmstudio.nix @@ -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 ` 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 ]; }; }