-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
583485f
commit cc4b5c1
Showing
9 changed files
with
268 additions
and
46 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
fontFamily, | ||
fontSize, | ||
theme, | ||
}: | ||
# it's not toml, but close enough for highlights | ||
# toml | ||
'' | ||
auto-update = off | ||
gtk-single-instance = true | ||
gtk-titlebar = false | ||
font-family = ${fontFamily} | ||
font-size = ${toString fontSize} | ||
mouse-hide-while-typing = true | ||
theme = ${theme} | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
inputs, | ||
... | ||
}: | ||
with lib; | ||
let | ||
cfg = config.konrad.programs.ghostty; | ||
in | ||
{ | ||
options.konrad.programs.ghostty = { | ||
enable = mkEnableOption "Enables Ghostty configuration management through home-manager"; | ||
|
||
makeDefault = mkOption { | ||
type = types.bool; | ||
default = true; | ||
description = "Whether to make this terminal default by setting TERMINAL env var"; | ||
}; | ||
|
||
fontSize = mkOption { | ||
type = types.nullOr types.number; | ||
default = config.fontProfiles.monospace.size; | ||
example = "13.0"; | ||
description = "Font size. If null, ghostty will set it automatically."; | ||
}; | ||
|
||
fontFamily = mkOption rec { | ||
type = types.nullOr types.str; | ||
default = config.fontProfiles.monospace.family; | ||
example = default; | ||
description = "Font Family to use. If null, ghostty will set it automatically."; | ||
}; | ||
|
||
theme = mkOption { | ||
type = types.nullOr types.str; | ||
default = config.colorscheme.name; | ||
example = "JetBrains Dracula"; | ||
description = "Theme to use. See 'ghosty +list-themes'"; | ||
}; | ||
|
||
package = mkOption { | ||
type = types.nullOr types.package; | ||
default = inputs.ghostty.packages.${pkgs.system}.default; | ||
description = "Package for ghostty. If null, it won't be installed."; | ||
example = "pkgs.ghostty"; | ||
}; | ||
}; | ||
|
||
config = | ||
let | ||
baseConfig = pkgs.callPackage ./config.nix { inherit (cfg) fontFamily fontSize theme; }; | ||
in | ||
mkIf cfg.enable { | ||
home = { | ||
packages = lib.optional (cfg.package != null) cfg.package; | ||
sessionVariables.TERMINAL = mkIf cfg.makeDefault "ghostty"; | ||
}; | ||
|
||
xdg.configFile."ghostty/config".text = baseConfig; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
"alacritty" | ||
"calibre" | ||
"firefox" | ||
"ghostty" | ||
"gimp" | ||
"keepingyouawake" | ||
"microsoft-auto-update" | ||
|