Browse Source

bug: tmux shell run around

Zander Hawke 10 months ago
parent
commit
bdbdf16677
2 changed files with 15 additions and 4 deletions
  1. 8 3
      home/features/cli/tmux.nix
  2. 7 1
      hosts/meili/default.nix

+ 8 - 3
home/features/cli/tmux.nix

@@ -4,7 +4,7 @@
 , ...
 }: {
   programs.tmux = {
-    sensibleOnTop = false;
+    sensibleOnTop = true;
 
     baseIndex = 1;
     clock24 = true;
@@ -17,7 +17,6 @@
     terminal = "tmux-256color";
 
     plugins = with pkgs.tmuxPlugins; [
-      sensible
       tmux-select-pane-no-wrap
       vim-tmux-navigator
       yank
@@ -36,12 +35,15 @@
           set -g @kanagawa-show-battery true
           set -g @kanagawa-show-powerline true
           set -g @kanagawa-show-location false
-          set -g window-style 'fg=colour250'
         '';
       }
     ];
 
     extraConfig = ''
+      # TODO: this should only run on macos
+      # sensible plugin assumes $SHELL is /bin/sh
+      set-option -g default-command "${lib.getExe' pkgs.reattach-to-user-namespace "reattach-to-user-namespace"} -l $SHELL"
+
       # split windows on the current path
       unbind %
       unbind '"'
@@ -62,6 +64,9 @@
 
       # default layout
       # set-hook -g after-new-window 'split-window -v -p 20'
+
+      # transparent please
+      set -g window-style 'fg=colour250,bg=default'
     '';
   };
 }

+ 7 - 1
hosts/meili/default.nix

@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, config, ... }:
+{
   imports =
     [
       outputs.modules.global.nix-config
@@ -44,6 +45,10 @@
     };
   };
 
+  environment.shells = [
+    config.programs.fish.package
+  ];
+
   # TODO: move into module:
   # system.activationScripts.extraActivation.text = lib.mkAfter ''
   #   # disable spotlight
@@ -61,6 +66,7 @@
   };
 
   users.users.thomas.home = "/Users/thomas";
+  users.users.thomas.shell = config.programs.fish.package;
   users.groups.nix-users.members = [ "thomas" ];
   ids.gids.nixbld = 350;
   nix.settings.trusted-users = [ "thomas" ];