ghostty: fix config

This commit is contained in:
Bloxx12 2025-07-03 23:34:56 +02:00
commit 2b9a8a4f3b
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
3 changed files with 137 additions and 24 deletions

92
flake.lock generated
View file

@ -272,6 +272,39 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"git-hooks-nix": { "git-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -693,6 +726,41 @@
"type": "github" "type": "github"
} }
}, },
"lix": {
"flake": false,
"locked": {
"lastModified": 1751235704,
"narHash": "sha256-J4ycLoXHPsoBoQtEXFCelL4xlq5pT8U9tNWNKm43+YI=",
"rev": "1d7368585eebaa2c4bdbcb88fe600cfb2239b2c6",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/1d7368585eebaa2c4bdbcb88fe600cfb2239b2c6.tar.gz?rev=1d7368585eebaa2c4bdbcb88fe600cfb2239b2c6"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz"
}
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils",
"flakey-profile": "flakey-profile",
"lix": "lix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751240025,
"narHash": "sha256-SXUAlxpjPRkArRMHy5+Hdi+PiC+ND9yzzIjiaHmTvQU=",
"rev": "8b1094356f4723d6e89d3f8a95b333ee16d9ab02",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/8b1094356f4723d6e89d3f8a95b333ee16d9ab02.tar.gz?rev=8b1094356f4723d6e89d3f8a95b333ee16d9ab02"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz"
}
},
"nix": { "nix": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
@ -708,12 +776,10 @@
"revCount": 21102, "revCount": 21102,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.7.0/0197d1ca-253f-75ae-9f36-38c46bd107f4/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.7.0/0197d1ca-253f-75ae-9f36-38c46bd107f4/source.tar.gz"
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz?rev=cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A" "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A"
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"
} }
}, },
"nixpak": { "nixpak": {
@ -907,11 +973,12 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"impermanence": "impermanence", "impermanence": "impermanence",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"lix-module": "lix-module",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"quickshell": "quickshell", "quickshell": "quickshell",
"rust-overlay": "rust-overlay_2", "rust-overlay": "rust-overlay_2",
"schizofox": "schizofox", "schizofox": "schizofox",
"systems": "systems_2", "systems": "systems_3",
"watt": "watt" "watt": "watt"
} }
}, },
@ -964,7 +1031,7 @@
"nixpak": "nixpak", "nixpak": "nixpak",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"searx-randomizer": "searx-randomizer", "searx-randomizer": "searx-randomizer",
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1744892989, "lastModified": 1744892989,
@ -1004,6 +1071,21 @@
} }
}, },
"systems": { "systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -1018,7 +1100,7 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": { "systems_3": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",

View file

@ -80,7 +80,7 @@
}; };
lix-module = { lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"; url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };

View file

@ -6,6 +6,8 @@
}: let }: let
inherit (lib.lists) elem; inherit (lib.lists) elem;
inherit (lib.meta) getExe; inherit (lib.meta) getExe;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.strings) concatStringsSep;
inherit (config.meta.mainUser.defaultShell) name package; inherit (config.meta.mainUser.defaultShell) name package;
inherit (config.modules.style.colorScheme) slug; inherit (config.modules.style.colorScheme) slug;
@ -17,30 +19,59 @@
then name then name
else "none"; else "none";
ghostty-settings = pkgs.writeText "config" '' ghostty-settings = {
font-family = JetBrainsMono Nerd Font Mono font-family = "JetBrainsMonoNerdFont";
window-padding-x = 8 font-family-bold = "JetBrainsMonoNerdFontBold";
window-padding-y = 8 font-family-italic = "JetBrainsMonoNerdFontItalic";
background-opacity = 0.85 font-family-bold-italic = "JetBrainsMonoNerdFontBoldItalic";
gtk-single-instance = true font-size = 14;
font-size = 14
theme = ${slug}
resize-overlay-duration = 0s
cursor-style-blink = false
confirm-close-surface = false
copy-on-select = true
term = xterm-256color
shell-integration = ${shell-integration} window-padding-x = 8;
command = ${getExe package} window-padding-y = 8;
''; background-opacity = 0.85;
gtk-single-instance = "true";
gtk-tabs-location = "bottom";
gtk-wide-tabs = false;
window-padding-balance = true;
window-decoration = "none";
theme = slug;
resize-overlay-duration = "0s";
cursor-style-blink = "false";
confirm-close-surface = "false";
mouse-hide-while-typing = "true";
window-theme = "ghostty";
bold-is-bright = "true";
term = "xterm-256color";
app-notifications = "no-clipboard-copy";
shell-integration-features = "cursor,sudo,no-title";
# window-padding-y = 10;
cursor-style = "block";
# Whether to automatically copy selected text to the clipboard. true will prefer to copy to the selection clipboard, otherwise it will copy to the system clipboard.
# The value clipboard will always copy text to the selection clipboard as well as the system clipboard.
copy-on-select = "clipboard";
shell-integration = shell-integration;
command = getExe package;
};
settingsFile = pkgs.writeText "config" <| concatStringsSep "\n" <| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
ghostty = pkgs.ghostty.overrideAttrs (_: {
preBuild = ''
shopt -s globstar
sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig
shopt -u globstar
'';
});
ghostty-wrapped = pkgs.symlinkJoin { ghostty-wrapped = pkgs.symlinkJoin {
name = "ghostty-wrapped"; name = "ghostty-wrapped";
paths = [pkgs.ghostty]; paths = [ghostty];
nativeBuildInputs = [pkgs.makeWrapper]; nativeBuildInputs = [pkgs.makeWrapper];
postBuild = '' postBuild = ''
wrapProgram $out/bin/ghostty --add-flags "--config-file=${ghostty-settings}" wrapProgram $out/bin/ghostty --add-flags "--config-file=${settingsFile}"
''; '';
}; };
in { in {