From f9cccfdd3cd659b68460075e0b6798048e0fd61d Mon Sep 17 00:00:00 2001 From: janis Date: Tue, 28 Jul 2026 16:56:36 +0200 Subject: [PATCH] ghostty --- home/default.nix | 1 + home/ghostty.nix | 29 +++++++++++++++++++++++++++++ system/default.nix | 1 + system/xdg.nix | 14 ++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 home/ghostty.nix create mode 100644 system/xdg.nix diff --git a/home/default.nix b/home/default.nix index e552d32..abdfeda 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,6 +1,7 @@ {...}: { imports = [ ./alacritty.nix + ./ghostty.nix ./common.nix ./desktop-apps.nix ./development diff --git a/home/ghostty.nix b/home/ghostty.nix new file mode 100644 index 0000000..f1e7e86 --- /dev/null +++ b/home/ghostty.nix @@ -0,0 +1,29 @@ +{lib, super-config, ...}: +let + # theme = import ../data/theme.nix {config = super-config; }; + mkIfOrElse = cond: then_: else_: (lib.mkMerge [ + (lib.mkIf cond then_) + (lib.mkIf (!cond) else_) + ]); +in { + programs.ghostty = { + enable = true; + settings = { + font-family = "monospace"; + font-size = 12; + title-report = true; + shell-integration = "zsh"; + shell-integration-features = "no-cursor"; + theme = "dark: Gruvbox Dark, light: Gruvbox Light"; + window-theme = mkIfOrElse (super-config.darkMode == true) "dark" "light"; + + cursor-style = "block"; + cursor-style-blink = false; + cursor-opacity = 0.8; + + keybind = [ + "ctrl+shift+enter=new_window" + ]; + }; + }; +} diff --git a/system/default.nix b/system/default.nix index 42699d1..d7fe5ff 100644 --- a/system/default.nix +++ b/system/default.nix @@ -2,6 +2,7 @@ imports = [ ./boot.nix ./core.nix + ./xdg.nix ./fonts.nix ./hardware.nix ./networking.nix diff --git a/system/xdg.nix b/system/xdg.nix new file mode 100644 index 0000000..3c35d5c --- /dev/null +++ b/system/xdg.nix @@ -0,0 +1,14 @@ +{pkgs, ...}: { + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + xdg-desktop-portal-xapp + ]; + + config.common.default = "*"; + }; +}