2025-06-12 20:09:05 +02:00
{
lib ,
2025-07-21 00:02:31 +02:00
osConfig ,
2025-06-12 20:09:05 +02:00
pkgs ,
. . .
2025-07-20 01:23:48 +02:00
} :
let
2025-06-12 20:09:05 +02:00
inherit ( lib . lists ) elem ;
inherit ( lib . meta ) getExe ;
2025-07-03 23:34:56 +02:00
inherit ( lib . attrsets ) mapAttrsToList ;
inherit ( lib . strings ) concatStringsSep ;
2025-06-12 20:09:05 +02:00
2025-07-21 00:02:31 +02:00
inherit ( osConfig . meta . mainUser . defaultShell ) name package ;
2025-06-12 20:09:05 +02:00
# Shell integration for ghostty only supports
# bash, fish and zsh for now.
shell-integration =
2025-07-20 01:23:48 +02:00
if
elem name [
" b a s h "
" f i s h "
" z s h "
]
then
name
else
" n o n e " ;
2025-06-12 20:09:05 +02:00
2025-07-03 23:34:56 +02:00
ghostty-settings = {
font-size = 14 ;
2025-07-13 22:51:22 +02:00
font-family = " J e t B r a i n s M o n o N e r d F o n t " ;
2025-06-12 20:09:05 +02:00
2025-07-13 22:51:22 +02:00
app-notifications = " n o - c l i p b o a r d - c o p y " ;
2025-07-25 16:58:13 +02:00
background-opacity = 1 .0 ;
2025-07-13 22:51:22 +02:00
bold-is-bright = " t r u e " ;
confirm-close-surface = " f a l s e " ;
cursor-style-blink = " f a l s e " ;
2025-07-03 23:34:56 +02:00
gtk-single-instance = " t r u e " ;
gtk-tabs-location = " b o t t o m " ;
gtk-wide-tabs = false ;
mouse-hide-while-typing = " t r u e " ;
2025-07-13 22:51:22 +02:00
resize-overlay-duration = " 0 s " ;
2025-07-03 23:34:56 +02:00
shell-integration-features = " c u r s o r , s u d o , n o - t i t l e " ;
2025-07-13 22:51:22 +02:00
term = " x t e r m - 2 5 6 c o l o r " ;
2025-07-27 16:52:55 +02:00
theme = " G r u v b o x D a r k H a r d " ;
2025-07-13 22:51:22 +02:00
window-decoration = " n o n e " ;
window-padding-balance = true ;
window-padding-x = 8 ;
window-padding-y = 8 ;
window-theme = " g h o s t t y " ;
2025-07-03 23:34:56 +02:00
cursor-style = " b l o c k " ;
# 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 = " c l i p b o a r d " ;
2025-07-08 13:57:04 +02:00
inherit shell-integration ;
2025-07-13 22:51:22 +02:00
2025-07-03 23:34:56 +02:00
command = getExe package ;
} ;
2025-07-20 01:23:48 +02:00
in
{
2025-07-21 00:02:31 +02:00
packages = builtins . attrValues {
inherit ( pkgs ) ghostty ;
2025-06-12 20:09:05 +02:00
} ;
2025-07-21 00:02:31 +02:00
files . " . c o n f i g / g h o s t t y / c o n f i g " . text =
concatStringsSep " \n "
< | mapAttrsToList ( name : value : " ${ name } = ${ toString value } " ) ghostty-settings ;
2025-06-12 20:09:05 +02:00
}