From 1588cb2e997fb37a4eab78da13808faf49df903f Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Thu, 31 Oct 2024 15:02:36 +1100 Subject: [PATCH 1/2] environment: remove misleading `environment.loginShell` option --- modules/environment/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/environment/default.nix b/modules/environment/default.nix index 00d58c09..994c77a3 100644 --- a/modules/environment/default.nix +++ b/modules/environment/default.nix @@ -18,6 +18,11 @@ in { imports = [ (mkRenamedOptionModule ["environment" "postBuild"] ["environment" "extraSetup"]) + (mkRemovedOptionModule [ "environment" "loginShell" ] '' + This option was only used to change the default command in tmux. + + This has been removed in favour of changing the default command or default shell in tmux directly. + '') ]; options = { @@ -74,12 +79,6 @@ in ''; }; - environment.loginShell = mkOption { - type = types.str; - default = "$SHELL -l"; - description = "Configure default login shell."; - }; - environment.variables = mkOption { type = types.attrsOf (types.either types.str (types.listOf types.str)); default = {}; From 63f4d40e551e7b29fbe586967c03eea1e6a70ce4 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Thu, 31 Oct 2024 15:59:09 +1100 Subject: [PATCH 2/2] tmux: remove `programs.tmux.defaultCommand` --- modules/examples/lnl.nix | 1 - modules/programs/tmux.nix | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index 010dff5a..d944158a 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -277,7 +277,6 @@ zle -N up-line-or-beginning-search ''; - environment.loginShell = "${pkgs.zsh}/bin/zsh -l"; environment.variables.SHELL = "${pkgs.zsh}/bin/zsh"; environment.variables.LANG = "en_US.UTF-8"; diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index ae6fcbf9..d70dab18 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -41,6 +41,7 @@ in { imports = [ (mkRenamedOptionModule [ "programs" "tmux" "tmuxConfig" ] [ "programs" "tmux" "extraConfig" ]) + (mkRemovedOptionModule [ "programs" "tmux" "defaultCommand" ] "Use `programs.tmux.extraConfig` to configure the default command instead. If unset, tmux will default to using your system configured login shell.") ]; options = { programs.tmux.enable = mkOption { @@ -84,11 +85,6 @@ in description = "Cater to iTerm2 and its tmux integration, as appropriate."; }; - programs.tmux.defaultCommand = mkOption { - type = types.either types.str types.package; - description = "The default command to use for tmux panes."; - }; - programs.tmux.tmuxOptions = mkOption { internal = true; type = types.attrsOf (types.submodule text); @@ -120,12 +116,6 @@ in source-file -q /etc/tmux.conf.local ''; - programs.tmux.defaultCommand = mkDefault config.environment.loginShell; - - programs.tmux.tmuxOptions.login-shell.text = '' - set -g default-command "${cfg.defaultCommand}" - ''; - programs.tmux.tmuxOptions.sensible.text = mkIf cfg.enableSensible '' set -g default-terminal "screen-256color" setw -g aggressive-resize on