modules/hm/programs/terminal/emulators/ghostty: add service for faster startups

This commit is contained in:
Anthony Rodriguez 2025-01-24 13:03:35 +01:00
parent 21ae70eb72
commit 25b23ee693
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -1,5 +1,6 @@
{ {
lib, lib,
pkgs,
osConfig, osConfig,
... ...
}: let }: let
@ -44,11 +45,35 @@ in {
programs.ghostty = lib.mkMerge [ programs.ghostty = lib.mkMerge [
{ {
enable = true; enable = true;
settings = {
font-family = ["monospace" "Symbols Nerd Font"];
font-size = 14;
gtk-single-instance = true;
confirm-close-surface = false;
};
} }
(optionalAttrs styleCfg.enable { (optionalAttrs styleCfg.enable {
settings.theme = "base16"; settings.theme = "base16";
themes.base16 = mkIf styleCfg.enable (mkGhosttyTheme styleCfg.scheme.palette); themes.base16 = mkIf styleCfg.enable (mkGhosttyTheme styleCfg.scheme.palette);
}) })
]; ];
systemd.user.services.ghosttyd = {
Unit = {
Description = "ghosttyd";
PartOf = "graphical-session.target";
After = "graphical-session.target";
};
Service = {
Type = "simple";
ExecStart = "${pkgs.ghostty}/bin/ghostty --initial-window=false --quit-after-last-window-closed=false";
Slice = "background-graphical.slice";
Restart = "on-failure";
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
}; };
} }