From 2a54c353a9ee4c06866047b0abf0a418ab91a475 Mon Sep 17 00:00:00 2001 From: Jack McCown Date: Sat, 1 Aug 2020 19:57:42 -0400 Subject: [PATCH] gnome-terminal: add profile command options Allow setting custom command and login shell. PR #1423 --- modules/programs/gnome-terminal.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/programs/gnome-terminal.nix b/modules/programs/gnome-terminal.nix index 373ff756..f1b15862 100644 --- a/modules/programs/gnome-terminal.nix +++ b/modules/programs/gnome-terminal.nix @@ -122,6 +122,20 @@ let The number of scrollback lines to keep, null for infinite. ''; }; + + customCommand = mkOption { + default = null; + type = types.nullOr types.str; + description = '' + The command to use to start the shell, or null for default shell. + ''; + }; + + loginShell = mkOption { + default = false; + type = types.bool; + description = "Run command as a login shell."; + }; }; }); @@ -132,7 +146,13 @@ let scrollback-lines = pcfg.scrollbackLines; cursor-shape = pcfg.cursorShape; cursor-blink-mode = pcfg.cursorBlinkMode; - } // (if (pcfg.font == null) then { + login-shell = pcfg.loginShell; + } // (if (pcfg.customCommand != null) then { + use-custom-command = true; + custom-command = pcfg.customCommand; + } else { + use-custom-command = false; + }) // (if (pcfg.font == null) then { use-system-font = true; } else { use-system-font = false;