Update pi

This commit is contained in:
Martin Pander
2026-08-24 08:59:22 +02:00
parent 40223d29dc
commit 331b759b7d
10 changed files with 486 additions and 807 deletions

View File

@@ -3,6 +3,9 @@
let
cfg = config.dot.tmux;
# tmuxp from nixpkgs-unstable (provided by modules/overlays/unstable.nix)
tmuxp = pkgs.unstable.tmuxp;
projectSelector = pkgs.writeScriptBin "projectSelector" ''
#!${pkgs.zsh}/bin/zsh
# Configuration
@@ -48,7 +51,7 @@ let
# Background load all but the last selection
if [[ $i -lt $total ]]; then
if [[ -f "$target/.tmuxp.yaml" || -f "$target/.tmuxp.yml" ]]; then
${pkgs.tmuxp}/bin/tmuxp load --yes -d "$target"
${tmuxp}/bin/tmuxp load --yes -d "$target"
else
if ! ${pkgs.tmux}/bin/tmux has-session -t "$s_name" 2>/dev/null; then
${pkgs.tmux}/bin/tmux new-session -d -s "$s_name" -c "$target"
@@ -57,7 +60,7 @@ let
else
# Last item: Foreground switch/attach
if [[ -f "$target/.tmuxp.yaml" || -f "$target/.tmuxp.yml" ]]; then
${pkgs.tmuxp}/bin/tmuxp load --yes "$target"
${tmuxp}/bin/tmuxp load --yes "$target"
else
if ! ${pkgs.tmux}/bin/tmux has-session -t "$s_name" 2>/dev/null; then
${pkgs.tmux}/bin/tmux new-session -d -s "$s_name" -c "$target"
@@ -116,8 +119,10 @@ in
mouse = true;
keyMode = "vi";
escapeTime = 10;
terminal = "screen-256color";
tmuxp.enable = true;
terminal = "xterm-256color";
# tmuxp is installed manually below to pin it to unstable
# (programs.tmux.tmuxp has no package option)
tmuxp.enable = false;
extraConfig = ''
set -g display-time 1500
set -s set-clipboard on
@@ -281,6 +286,7 @@ in
home.packages = [
tmuxKiller
tmuxp
] ++ lib.optional cfg.workMode projectSelector;
home.shellAliases = {