Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion home-manager/programs/php/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
php
nodePackages.intelephense
php
];
}
10 changes: 5 additions & 5 deletions home-manager/programs/tmux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
enable = true;
extraConfig = builtins.readFile ./tmux.conf;
plugins = with pkgs.tmuxPlugins; [
continuum
extrakto
open
resurrect
sensible
yank
tmux-fzf
resurrect
continuum
tmux-sessionx
tmux-thumbs
open
extrakto
yank
];
Comment on lines 11 to 21

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鈿狅笍 Potential issue | 馃敶 Critical

馃З Analysis chain

馃弫 Script executed:

#!/bin/bash
# Description: Check tmux plugin dependencies and home-manager implementation

# Check home-manager's tmux module implementation for plugin ordering behavior
rg -n -C5 'tmux.*plugins' --type=nix --glob='**/modules/programs/tmux*'

# Check if continuum has explicit resurrect dependency
fd -e nix -e txt -e md 'continuum|resurrect' --exec rg -l 'continuum.*resurrect|resurrect.*continuum' {}

# Look for any plugin ordering documentation or comments
rg -n 'plugin.*order|load.*order|before.*after' --type=nix --glob='**/tmux*'

Repository: shunkakinoki/dotfiles

Length of output: 213


馃弫 Script executed:

#!/bin/bash
# Check repository structure and locate the tmux configuration file
echo "=== Checking for tmux-related files ==="
find . -name "*tmux*" -type f | head -20

echo -e "\n=== Checking if home-manager directory exists ==="
ls -la home-manager/ 2>/dev/null || echo "home-manager not at root"

echo -e "\n=== Finding tmux configuration files ==="
fd -e nix . | rg -i tmux

Repository: shunkakinoki/dotfiles

Length of output: 762


馃弫 Script executed:

#!/bin/bash
# Read the actual tmux configuration file mentioned in the review
cat -n home-manager/programs/tmux/default.nix 2>/dev/null || echo "File not found at specified path"

Repository: shunkakinoki/dotfiles

Length of output: 632


馃寪 Web query:

home-manager tmux plugin loading order dependencies

馃挕 Result:

In Home Manager's programs.tmux module, the generated ~/.config/tmux/tmux.conf has a specific structure for plugin loading and dependencies. Structure (order in tmux.conf): 1. Module defaults (e.g., set -g escape-time 500, default-terminal "screen", etc.) using lib.mkBefore. 2. Plugins section: For each plugin in programs.tmux.plugins (in list order): - Optional plugin.extraConfig (must be before run-shell for plugin vars to be available). - run-shell ${plugin.rtp} (loads the plugin script). 3. Global extraConfig using lib.mkAfter (after plugins). Plugin loading order is the order in the plugins list. Order matters for dependencies: plugins that modify shared elements like status-right must come before dependent plugins (e.g., theme before resurrect/continuum). Use plugin.extraConfig for per-plugin config before its run-shell. To place config before all plugins, users can override with xdg.configFile."tmux/tmux.conf".text = lib.mkOrder 600 "..."; (between defaults priority 500 and plugins 1000). extraConfig after plugins can reference plugin variables but cannot affect pre-plugin-run settings. No built-in extraConfigBeforePlugins (proposed PRs #3801, #4670, #6486 open/stale as of 2025). Workarounds for dependencies: - Put theme/config in plugin.extraConfig. - Order plugins carefully (e.g., sensible on top via sensibleOnTop=true). - Custom tmux.conf override for full control. Examples: plugins = with pkgs.tmuxPlugins; [ { plugin = catppuccin; extraConfig = "set -g @catppuccin_flavour 'frappe'"; } resurrect # depends on prior status-right setup ];

Citations:


馃弫 Script executed:

#!/bin/bash
# Check NixPkgs definition of tmux plugins to understand dependencies
echo "=== Searching for continuum and resurrect plugin definitions ==="
rg -A10 -B2 "continuum|resurrect" --type nix | head -100

echo -e "\n=== Check for any plugin dependency information ==="
rg "depends|require" --type nix | rg -i "continuum|resurrect"

Repository: shunkakinoki/dotfiles

Length of output: 967


馃寪 Web query:

tmux-continuum depends on tmux-resurrect plugin loading order

馃挕 Result:

Yes, tmux-continuum depends on tmux-resurrect and requires specific attention to plugin loading order when using Tmux Plugin Manager (TPM). tmux-continuum is built on top of tmux-resurrect: it automates saving and restoring tmux environments by calling resurrect's functionality. The official tmux-continuum README explicitly states "Please make sure you have tmux-resurrect installed" before adding continuum, and all installation examples list resurrect first: set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' While TPM loads plugins in the order listed in .tmux.conf, continuum modifies the status-right (or status-left) to insert its periodic save hook (continuum_save.sh). If another plugin loaded after continuum overwrites status-right (common with themes), continuum's autosave stops working. The official docs recommend: "To fix this issue, place the plugin last in the TPM plugins list." Resurrect has no such status modifications, so the standard order (resurrect before continuum, continuum last or near-last) ensures: - Continuum can call resurrect functions (loaded earlier). - No later plugins break continuum's status hook. User reports confirm issues when continuum is not positioned correctly relative to status-altering plugins, but no explicit "continuum requires resurrect before it" beyond dependency and examples. Continuum restore calls also assume resurrect is available at runtime. Example working .tmux.conf snippet: set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # or other non-status plugins set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' # last, before run tpm set -g @continuum-restore 'on' run '~/.tmux/plugins/tpm/tpm' Press prefix+I to install.

Citations:


馃寪 Web query:

tmux continuum plugin how it works resurrect dependency

馃挕 Result:

The tmux-continuum plugin provides continuous saving of the tmux environment every 15 minutes (configurable) in the background, automatic restoration of the last saved environment upon tmux server start (if enabled with set -g @continuum-restore 'on'), and optional automatic tmux startup after computer boot (if enabled with set -g @continuum-boot 'on'). It requires the tmux-resurrect plugin as a dependency, which handles the actual saving and restoring of tmux sessions, windows, panes, and running programs (manual save/restore via prefix + Ctrl-s / Ctrl-r). Continuum automates resurrect's functionality for seamless persistence across restarts. Installation via Tmux Plugin Manager: add set -g @plugin 'tmux-plugins/tmux-resurrect' and set -g @plugin 'tmux-plugins/tmux-continuum' to .tmux.conf, then prefix + I. Requires tmux 1.9+ and bash. Last updated 2024.

Citations:


Plugin load order breaks tmux-continuum functionality鈥攔esurrect must come before continuum, and continuum should be positioned near the end of the list.

The alphabetical reordering introduces a critical issue. The tmux-continuum plugin depends on tmux-resurrect and requires it to be loaded first. According to the official tmux-continuum documentation, continuum automates resurrect's save/restore functionality and will not work correctly if resurrect is not available at runtime. Additionally, continuum modifies the tmux status bar to insert its autosave hook; if status-altering plugins (like themes) load after continuum, they can overwrite this hook, breaking the automatic save feature.

The current order places continuum (line 12) before resurrect (line 15), and continuum is not positioned near the end of the list. This will break tmux session persistence. The correct ordering should be: resurrect before continuum, and continuum positioned last (or near-last) to prevent other plugins from overwriting its status modifications.

馃 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/programs/tmux/default.nix` around lines 11 - 21, The tmux plugin
load order is incorrect: move tmux-resurrect to be listed before tmux-continuum
and place tmux-continuum at or near the end of the plugins array so resurrect is
available when continuum initializes and continuum's status-bar modifications
are not overwritten; update the plugins list (the array assigned to plugins
using pkgs.tmuxPlugins that currently contains continuum, resurrect, etc.) to
ensure resurrect appears before continuum and continuum is last (or near-last).

};
}
8 changes: 4 additions & 4 deletions named-hosts/matic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ inputs.nixpkgs.lib.nixosSystem {
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Common libraries needed by security tools
glibc
zlib
openssl
curl
libnl
glibc
libgcc
libnl
openssl
zlib
];

# Nix settings
Expand Down
2 changes: 1 addition & 1 deletion named-hosts/matic/falcon/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ let
inherit version arch src;

buildInputs = [
autoPatchelfHook
dpkg
zlib
autoPatchelfHook
];
sourceRoot = ".";

Expand Down
Loading