aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/options.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-06-09 17:40:46 +0000
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-06-09 17:40:46 +0000
commita45c4551712c1ba5cb82eaf290f311ab0e8690e4 (patch)
treef62b23489fb31f8ea58fef77f99619efd784eb36 /modules/terminal/options.nix
big changes
Diffstat (limited to 'modules/terminal/options.nix')
-rw-r--r--modules/terminal/options.nix77
1 files changed, 77 insertions, 0 deletions
diff --git a/modules/terminal/options.nix b/modules/terminal/options.nix
new file mode 100644
index 0000000..b728f99
--- /dev/null
+++ b/modules/terminal/options.nix
@@ -0,0 +1,77 @@
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}: let
+ inherit (lib) mkOption mkEnableOption types;
+
+ mkProgramOption' = name: extraOpts:
+ {
+ enable = mkEnableOption "whether to enable ${name}";
+ theme = mkOption {
+ type = types.enum ["catppuccin" "adwaita"];
+ default = config.collinux.terminal.theme;
+ };
+ }
+ // extraOpts;
+
+ mkProgramOption = name: mkProgramOption' name {};
+in {
+ options = {
+ collinux.terminal = {
+ theme = mkOption {
+ type = types.enum ["catppuccin" "adwaita"];
+ default = config.collinux.theme;
+ };
+
+ shells = {
+ fish = mkProgramOption "fish shell";
+ bash = mkProgramOption "bash shell";
+
+ defaultShell = mkOption {
+ type = types.package;
+ description = "which shell is default";
+ default = let
+ cfg = config.collinux.terminal.shells;
+ in
+ if (cfg.fish.enable && !cfg.bash.enable)
+ then pkgs.fish
+ else if (!cfg.fish.enable && cfg.bash.enable)
+ then pkgs.bash
+ else null;
+ };
+ };
+
+ programs = {
+ # Themed
+ starship = mkProgramOption "starship prompt";
+ lazygit.enable = mkEnableOption "lazygit";
+ nh.enable = mkEnableOption "nh";
+
+ cmus = mkProgramOption "cmus";
+
+ git = {
+ enable = mkEnableOption "git";
+ userName = mkOption {
+ type = types.str;
+ default = config.collinux.user.name;
+ };
+ userEmail = mkOption {
+ type = types.str;
+ };
+ };
+
+ helix = mkProgramOption' "helix text editor" {
+ hardMode = mkOption {
+ type = types.bool;
+ description = "Disable arrow keys and mouse";
+ default = false;
+ };
+ };
+
+ tmux = mkProgramOption "tmux terminal multiplexer";
+ };
+ };
+ };
+}