ghostty: move to modules/home
Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a69641141c64ef2be00b4e93eefeba26ae292
This commit is contained in:
parent
2d3d2ef1d7
commit
917074fb32
1 changed files with 10 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -10,8 +10,7 @@ let
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
inherit (lib.strings) concatStringsSep;
|
inherit (lib.strings) concatStringsSep;
|
||||||
|
|
||||||
inherit (config.meta.mainUser.defaultShell) name package;
|
inherit (osConfig.meta.mainUser.defaultShell) name package;
|
||||||
inherit (config.modules.style.colorScheme) slug;
|
|
||||||
|
|
||||||
# Shell integration for ghostty only supports
|
# Shell integration for ghostty only supports
|
||||||
# bash, fish and zsh for now.
|
# bash, fish and zsh for now.
|
||||||
|
@ -30,11 +29,9 @@ let
|
||||||
ghostty-settings = {
|
ghostty-settings = {
|
||||||
font-size = 14;
|
font-size = 14;
|
||||||
font-family = "JetBrainsMonoNerdFont";
|
font-family = "JetBrainsMonoNerdFont";
|
||||||
# font-style-bold = JetBrainsMono NF Regular;
|
|
||||||
# font-style-bold-italic = JetBrainsMono NF Italic;
|
|
||||||
|
|
||||||
app-notifications = "no-clipboard-copy";
|
app-notifications = "no-clipboard-copy";
|
||||||
background-opacity = 0.9;
|
background-opacity = 0.7;
|
||||||
bold-is-bright = "true";
|
bold-is-bright = "true";
|
||||||
confirm-close-surface = "false";
|
confirm-close-surface = "false";
|
||||||
cursor-style-blink = "false";
|
cursor-style-blink = "false";
|
||||||
|
@ -45,7 +42,7 @@ let
|
||||||
resize-overlay-duration = "0s";
|
resize-overlay-duration = "0s";
|
||||||
shell-integration-features = "cursor,sudo,no-title";
|
shell-integration-features = "cursor,sudo,no-title";
|
||||||
term = "xterm-256color";
|
term = "xterm-256color";
|
||||||
theme = slug;
|
theme = "nightfox";
|
||||||
window-decoration = "none";
|
window-decoration = "none";
|
||||||
window-padding-balance = true;
|
window-padding-balance = true;
|
||||||
window-padding-x = 8;
|
window-padding-x = 8;
|
||||||
|
@ -60,23 +57,13 @@ let
|
||||||
|
|
||||||
command = getExe package;
|
command = getExe package;
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsFile =
|
|
||||||
pkgs.writeText "config"
|
|
||||||
<| concatStringsSep "\n"
|
|
||||||
<| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
|
|
||||||
|
|
||||||
ghostty-wrapped = pkgs.symlinkJoin {
|
|
||||||
name = "ghostty-wrapped";
|
|
||||||
paths = [ pkgs.ghostty ];
|
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/ghostty --add-flags "--config-file=${settingsFile}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = builtins.attrValues {
|
packages = builtins.attrValues {
|
||||||
inherit ghostty-wrapped;
|
inherit (pkgs) ghostty;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
files.".config/ghostty/config".text =
|
||||||
|
concatStringsSep "\n"
|
||||||
|
<| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue