ghostty-gpu-check

This commit is contained in:
John Lancaster
2026-05-06 20:25:55 -05:00
parent 24f43872ce
commit 12e7d290a1
2 changed files with 231 additions and 3 deletions
+19 -3
View File
@@ -9,7 +9,7 @@
flake.modules.homeManager.ghostty = { config, pkgs, lib, ... }:
let
ghosttyPackage = pkgs.symlinkJoin {
ghosttyX11 = pkgs.symlinkJoin {
name = "ghostty-x11";
paths = [ (config.lib.nixGL.wrap pkgs.ghostty) ];
nativeBuildInputs = [ pkgs.makeWrapper ];
@@ -24,6 +24,10 @@
TERMINAL = "ghostty";
};
home.packages = with pkgs; [
inputs.self.packages.${system}.ghosttyGPUCheck
];
targets.genericLinux.nixGL = {
packages = inputs.nixgl.packages.${pkgs.stdenv.hostPlatform.system};
defaultWrapper = "mesa";
@@ -33,7 +37,7 @@
programs.ghostty = {
enable = true;
enableZshIntegration = true;
package = ghosttyPackage;
package = ghosttyX11;
settings = {
command = "TERM=xterm-256color ${lib.getExe pkgs.zsh}";
font-size = 12;
@@ -72,7 +76,7 @@
# https://github.com/ghostty-org/ghostty/discussions/3763#discussioncomment-11699970
xdg.desktopEntries."com.mitchellh.ghostty" =
let
ghosttyCmd = lib.getExe ghosttyPackage;
ghosttyCmd = lib.getExe ghosttyX11;
in
{
name = "Ghostty";
@@ -100,4 +104,16 @@
};
};
};
perSystem = { system, pkgs, lib, ... }: {
packages.ghosttyGPUCheck = pkgs.writeShellApplication {
name = "ghostty-gpu-check";
runtimeInputs = with pkgs; [
bash
gnugrep
procps # for pgrep, pidof, etc.
];
text = builtins.readFile ../../scripts/ghostty-gpu-check.sh;
};
};
}