aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack McCown <jmccown@cbinsights.com>2020-08-01 19:57:42 -0400
committerRobert Helgesson <robert@rycee.net>2020-08-13 23:55:24 +0200
commit2a54c353a9ee4c06866047b0abf0a418ab91a475 (patch)
tree9d63eb74f9476c3877d1f325098c8e18e433e627
parent96e2f1bdf08add02065d7647d0d87a9d1662d0c1 (diff)
gnome-terminal: add profile command options
Allow setting custom command and login shell. PR #1423
-rw-r--r--modules/programs/gnome-terminal.nix22
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/programs/gnome-terminal.nix b/modules/programs/gnome-terminal.nix
index 373ff756bb6..f1b15862130 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;