Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fef4ff71bb | |||
| c0c1e92249 |
@@ -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";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,15 +12,63 @@
|
|||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
config.vim = {
|
config.vim = {
|
||||||
|
options = {
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
expandtab = true;
|
||||||
|
shiftwidth = 4;
|
||||||
|
tabstop = 4;
|
||||||
|
softtabstop = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
syntaxHighlighting = true;
|
||||||
|
|
||||||
# Enable custom theming options
|
# Enable custom theming options
|
||||||
theme.enable = true;
|
theme.enable = true;
|
||||||
|
theme.name = "catppuccin";
|
||||||
|
theme.style = "mocha";
|
||||||
|
|
||||||
|
lazy = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
{
|
||||||
|
name = "fzf";
|
||||||
|
packages = [pkgs.vimPlugins.telescope-fzf-native-nvim];
|
||||||
|
setup = {fzf = {fuzzy = true;};};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Enable Treesitter
|
# Enable Treesitter
|
||||||
treesitter.enable = true;
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
# grammars = [ "python" ];
|
||||||
|
};
|
||||||
|
|
||||||
# Other options will go here. Refer to the config
|
lsp.enable = true;
|
||||||
# reference in Appendix B of the nvf manual.
|
|
||||||
# ...
|
languages = {
|
||||||
|
enableTreesitter = true;
|
||||||
|
enableFormat = true;
|
||||||
|
python = {
|
||||||
|
enable = true;
|
||||||
|
dap.enable = true;
|
||||||
|
format.type = [ "ruff" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>m";
|
||||||
|
mode = "n";
|
||||||
|
silent = true;
|
||||||
|
action = ":make<CR>";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user