fixed ghostty x11 stuff
This commit is contained in:
@@ -8,6 +8,17 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.homeManager.ghostty = { config, pkgs, lib, ... }:
|
flake.modules.homeManager.ghostty = { config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
ghosttyPackage = pkgs.symlinkJoin {
|
||||||
|
name = "ghostty-x11";
|
||||||
|
paths = [ (config.lib.nixGL.wrap pkgs.ghostty) ];
|
||||||
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
|
meta.mainProgram = "ghostty";
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/ghostty --set GDK_BACKEND x11
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
TERMINAL = "ghostty";
|
TERMINAL = "ghostty";
|
||||||
@@ -22,7 +33,7 @@
|
|||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
package = config.lib.nixGL.wrap pkgs.ghostty;
|
package = ghosttyPackage;
|
||||||
settings = {
|
settings = {
|
||||||
command = "TERM=xterm-256color ${lib.getExe pkgs.zsh}";
|
command = "TERM=xterm-256color ${lib.getExe pkgs.zsh}";
|
||||||
font-size = 12;
|
font-size = 12;
|
||||||
@@ -60,13 +71,12 @@
|
|||||||
# https://github.com/ghostty-org/ghostty/discussions/3763#discussioncomment-11699970
|
# https://github.com/ghostty-org/ghostty/discussions/3763#discussioncomment-11699970
|
||||||
xdg.desktopEntries."com.mitchellh.ghostty" =
|
xdg.desktopEntries."com.mitchellh.ghostty" =
|
||||||
let
|
let
|
||||||
ghosttyCmd = "nixGLMesa ${lib.getExe pkgs.ghostty}";
|
ghosttyCmd = lib.getExe ghosttyPackage;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "Ghostty";
|
name = "Ghostty";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
comment = "A terminal emulator";
|
comment = "A terminal emulator";
|
||||||
# exec = "nixGLMesa ghostty";
|
|
||||||
exec = ghosttyCmd;
|
exec = ghosttyCmd;
|
||||||
icon = "com.mitchellh.ghostty";
|
icon = "com.mitchellh.ghostty";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
@@ -85,7 +95,6 @@
|
|||||||
new-window = {
|
new-window = {
|
||||||
name = "New Window";
|
name = "New Window";
|
||||||
exec = ghosttyCmd;
|
exec = ghosttyCmd;
|
||||||
# exec = "nixGLMesa ghostty";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user