Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.zellij.enable

Whether to enable Zellij.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.zellij.enableBashIntegration

Whether to enable Bash integration.

Type: boolean

Default:

Example:

true

Declared by:

programs.zellij.enableFishIntegration

Whether to enable Fish integration.

Type: boolean

Default:

Example:

true

Declared by:

programs.zellij.enableZshIntegration

Whether to enable Zsh integration.

Type: boolean

Default:

Example:

true

Declared by:

programs.zellij.package

The zellij package to use.

Type: package

Default:

pkgs.zellij

Declared by:

programs.zellij.attachExistingSession

Whether to attach to the default session after being autostarted if a Zellij session already exists.

Variable is checked in auto-start script. Requires shell integration to be enabled to have effect.

Type: boolean

Default:

false

Declared by:

programs.zellij.exitShellOnExit

Whether to exit the shell when Zellij exits after being autostarted.

Variable is checked in auto-start script. Requires shell integration to be enabled to have effect.

Type: boolean

Default:

false

Declared by:

programs.zellij.extraConfig

Extra configuration lines to add to $XDG_CONFIG_HOME/zellij/config.kdl.

This does not support zellij.yaml and it’s mostly a workaround for https://github.com/nix-community/home-manager/issues/4659.

Type: strings concatenated with “\n”

Default:

""

Example:

''
  keybinds {
      // keybinds are divided into modes
      normal {
          // bind instructions can include one or more keys (both keys will be bound separately)
          // bind keys can include one or more actions (all actions will be performed with no sequential guarantees)
          bind "Ctrl g" { SwitchToMode "locked"; }
          bind "Ctrl p" { SwitchToMode "pane"; }
          bind "Alt n" { NewPane; }
          bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
      }
      pane {
          bind "h" "Left" { MoveFocus "Left"; }
          bind "l" "Right" { MoveFocus "Right"; }
          bind "j" "Down" { MoveFocus "Down"; }
          bind "k" "Up" { MoveFocus "Up"; }
          bind "p" { SwitchFocus; }
      }
      locked {
          bind "Ctrl g" { SwitchToMode "normal"; }
      }
  }
''

Declared by:

programs.zellij.layouts

Configuration written to $XDG_CONFIG_HOME/zellij/layouts/<layout>.kdl.

See https://zellij.dev/documentation for the full list of options.

Type: attribute set of (YAML 1.1 value or absolute path or strings concatenated with “\n”)

Default:

{ }

Example:

{
  dev = {
    layout = {
      _children = [
        {
          default_tab_template = {
            _children = [
              {
                pane = {
                  borderless = true;
                  plugin = {
                    location = "zellij:tab-bar";
                  };
                  size = 1;
                };
              }
              {
                children = { };
              }
              {
                pane = {
                  borderless = true;
                  plugin = {
                    location = "zellij:status-bar";
                  };
                  size = 2;
                };
              }
            ];
          };
        }
        {
          tab = {
            _children = [
              {
                pane = {
                  command = "nvim";
                };
              }
            ];
            _props = {
              focus = true;
              name = "Project";
            };
          };
        }
        {
          tab = {
            _children = [
              {
                pane = {
                  command = "lazygit";
                };
              }
            ];
            _props = {
              name = "Git";
            };
          };
        }
        {
          tab = {
            _children = [
              {
                pane = {
                  command = "yazi";
                };
              }
            ];
            _props = {
              name = "Files";
            };
          };
        }
        {
          tab = {
            _children = [
              {
                pane = {
                  command = "zsh";
                };
              }
            ];
            _props = {
              name = "Shell";
            };
          };
        }
      ];
    };
  };
}

Declared by:

programs.zellij.plugins

List of Zellij plugins

Type: list of package

Default:

[ ]

Example:

with pkgs.zellijPlugins; [ jbz vim-plugins-navigator zjstatus ]

Declared by:

programs.zellij.settings

Configuration written to $XDG_CONFIG_HOME/zellij/config.kdl.

If programs.zellij.package.version is older than 0.32.0, then the configuration is written to $XDG_CONFIG_HOME/zellij/config.yaml.

See https://zellij.dev/documentation for the full list of options.

Type: YAML 1.1 value

Default:

{ }

Example:

{
  theme = "custom";
  themes.custom.fg = "#ffffff";
  keybinds._props.clear-defaults = true;
  keybinds.pane._children = [
    {
      bind = {
        _args = ["e"];
        _children = [
          { TogglePaneEmbedOrFloating = {}; }
          { SwitchToMode._args = ["locked"]; }
        ];
      };
    }
    {
      bind = {
        _args = ["left"];
        MoveFocus = ["left"];
      };
    }
  ];
}

Declared by:

programs.zellij.themes

Each them is written to $XDG_CONFIG_HOME/zellij/themes/NAME.kdl. See https://zellij.dev/documentation/themes.html for more information.

Type: attribute set of (YAML 1.1 value or absolute path or strings concatenated with “\n”)

Default:

{ }

Declared by: