summaryrefslogtreecommitdiff
path: root/common/modules/terminal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/terminal/default.nix')
-rw-r--r--common/modules/terminal/default.nix72
1 files changed, 72 insertions, 0 deletions
diff --git a/common/modules/terminal/default.nix b/common/modules/terminal/default.nix
new file mode 100644
index 0000000..b8f97c2
--- /dev/null
+++ b/common/modules/terminal/default.nix
@@ -0,0 +1,72 @@
+{
+ homeManager,
+ inputs,
+ moduleNameSpace,
+ ...
+}:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib;
+let
+ cfg = config.${moduleNameSpace}.terminal;
+in
+{
+ imports = [
+ (import ./foot.nix { inherit lib config; })
+ (import ./ghostty.nix { inherit lib config; })
+ (import ./alacritty.nix { inherit lib config; })
+ ];
+
+ options.${moduleNameSpace}.terminal = {
+ default = mkOption {
+ type = types.enum [
+ "foot"
+ "ghostty"
+ "alacritty"
+ ];
+ default = "foot";
+ description = "The terminal emulator to enable.";
+ };
+ foot = mkEnableOption "enable foot";
+ alacritty = mkEnableOption "enable alacritty";
+ ghostty = mkEnableOption "enable ghostty";
+
+ font = {
+ family = mkOption {
+ type = types.str;
+ default = "monospace";
+ };
+
+ size = mkOption {
+ type = types.float;
+ default = 13.0;
+ };
+
+ bright_color_is_bold = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Force bold text";
+ };
+
+ ligatures = mkEnableOption "Only supported by ghostty";
+ };
+
+ window = {
+ padding-x = mkOption {
+ type = types.int;
+ default = 10;
+ description = "Window padding x axis (pixels).";
+ };
+
+ padding-y = mkOption {
+ type = types.int;
+ default = 10;
+ description = "Window padding y axis (pixels).";
+ };
+ };
+ };
+}