From 31905152dad96df70103c682c14fb4d5cbd36f6f Mon Sep 17 00:00:00 2001 From: rogueking Date: Mon, 27 Jul 2026 15:17:22 -0700 Subject: [PATCH] llama.cpp fixes --- home-manager/programs/ghostty/ghostty.nix | 24 +++++++++++++---------- hosts/ender-ml/configuration.nix | 20 +++++++++---------- hosts/ender-ml/hardware-configuration.nix | 22 ++++++++++++--------- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/home-manager/programs/ghostty/ghostty.nix b/home-manager/programs/ghostty/ghostty.nix index 6b780fe..b83057d 100644 --- a/home-manager/programs/ghostty/ghostty.nix +++ b/home-manager/programs/ghostty/ghostty.nix @@ -1,35 +1,39 @@ -{ hostname, lib, ... }: { +{ + hostname, + lib, + ... +}: { programs.ghostty = { enable = true; - + # Use mkForce to safely override the default package on eva-02 package = lib.mkIf (hostname == "eva-02") (lib.mkForce null); - + enableZshIntegration = true; - + settings = { # Use explicit theme instead of relying on system theme detection theme = "Adwaita Dark"; - + gtk-single-instance = true; - + font-family = "JetBrainsMono Nerd Font"; font-family-italic = "Maple Mono"; font-family-bold-italic = "Maple Mono"; font-size = 12; - + bold-is-bright = true; window-decoration = false; background-opacity = 0.8; - + # Note: 'background-blur-radius' is mostly a macOS-specific setting. # If you are on Linux, you likely want 'background-blur = true' instead. # background-blur-radius = 120; - + window-save-state = "always"; mouse-hide-while-typing = true; cursor-invert-fg-bg = true; - + # The global: prefix is perfectly valid for Ghostty's command palette and quick terminal keybind = [ "global:cmd+grave_accent=toggle_quick_terminal" diff --git a/hosts/ender-ml/configuration.nix b/hosts/ender-ml/configuration.nix index 659d7c9..cc10866 100644 --- a/hosts/ender-ml/configuration.nix +++ b/hosts/ender-ml/configuration.nix @@ -209,16 +209,16 @@ # }; # Enable llama-cpp server - # services.llama-cpp = { - # enable = true; - # package = pkgs-unstable.llama-cpp.override {cudaSupport = true;}; - # model = "/home/rogueking/models"; - # host = "0.0.0.0"; - # port = 8080; - # # extraFlags = [ - # # "n-gpu-layers 99" - # # ]; - # }; + services.llama-cpp = { + enable = true; + package = pkgs-unstable.llama-cpp.override {cudaSupport = true;}; + model = null; + host = "0.0.0.0"; + port = 8080; + extraFlags = [ + "--models-preset" "/etc/models.ini" + ]; + }; # Define a user account. Don't forget to set a password with ‘passwd’. programs.zsh.enable = true; diff --git a/hosts/ender-ml/hardware-configuration.nix b/hosts/ender-ml/hardware-configuration.nix index 7fde603..cdf8470 100644 --- a/hosts/ender-ml/hardware-configuration.nix +++ b/hosts/ender-ml/hardware-configuration.nix @@ -1,17 +1,21 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; - boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = []; + boot.extraModulePackages = []; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }