From 6154af49b7d0a61d36852bec7492d83d6c542ea8 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Sat, 4 Jan 2025 16:11:51 +0000
Subject: [PATCH] Move ghostty configuration

---
 ghostty/config                                  | 17 +++++++++++++++++
 .../home-manager/features/desktop/ghostty.nix   | 17 ++---------------
 2 files changed, 19 insertions(+), 15 deletions(-)
 create mode 100644 ghostty/config

diff --git a/ghostty/config b/ghostty/config
new file mode 100644
index 00000000..4bbd3b3e
--- /dev/null
+++ b/ghostty/config
@@ -0,0 +1,17 @@
+adjust-cell-height = 25%
+
+background = #000000
+
+cursor-style-blink = false
+
+# Disable ligatures.
+font-feature = -calt
+font-feature = -liga
+font-feature = -dlig
+
+font-size = 15
+
+window-decoration = false
+
+window-padding-x = 10
+window-padding-y = 10
diff --git a/nix/modules/home-manager/features/desktop/ghostty.nix b/nix/modules/home-manager/features/desktop/ghostty.nix
index 52743874..6101b71a 100644
--- a/nix/modules/home-manager/features/desktop/ghostty.nix
+++ b/nix/modules/home-manager/features/desktop/ghostty.nix
@@ -2,6 +2,7 @@
   config,
   inputs,
   lib,
+  self,
   system,
   ...
 }:
@@ -19,20 +20,6 @@ in
   config = mkIf cfg.enable {
     home.packages = [ pkgs-master.ghostty ];
 
-    xdg.configFile."ghostty/config".text = ''
-      background = #000000
-
-      # Disable ligatures.
-      font-feature = -calt
-      font-feature = -liga
-      font-feature = -dlig
-
-      font-size = 15
-
-      window-decoration = false
-
-      window-padding-x = 10
-      window-padding-y = 10
-    '';
+    xdg.configFile."ghostty/config".source = "${self}/ghostty/config";
   };
 }