{
  pkgs,
  lib,
  config,
  inputs,
  ...
}: let
  zellij-muon = pkgs.zellij.overrideAttrs (previousAttrs: {
    patches = previousAttrs.patches ++ [./zellij/floating_fix.patch];
  });
in {
  options.mods.zellij.enable =
    lib.mkEnableOption "enables zellij";

  config = lib.mkIf config.mods.terminal.development.enable {
    programs.zellij = {
      settings = {
        default_mode._args = ["locked"];
        show_startup_tips._args = [false];
        show_release_notes._args = [false];
        session_serialization._args = [false];
      };

      extraConfig = builtins.readFile ./config.kdl;

      layouts = {
        dev = {
          layout = {
            _children = [
              {
                default_tab_template = {
                  _children = [
                    {
                      pane = {
                        size = 1;
                        borderless = true;
                        plugin = {
                          location = "zellij:tab-bar";
                        };
                      };
                    }
                    {"children" = {};}
                    {
                      pane = {
                        size = 1;
                        borderless = true;
                        plugin = {
                          location = "zellij:status-bar";
                        };
                      };
                    }
                  ];
                };
              }
              {
                tab = {
                  _props = {
                    name = "project";
                    focus = true;
                  };
                  _children = [
                    {
                      pane = {
                        command = "zsh";
                        args = ["-c" "direnv exec . nvim"];
                      };
                    }
                  ];
                };
              }
              {
                tab = {
                  _props = {
                    name = "test";
                  };
                  _children = [
                    {
                      pane = {};
                    }
                  ];
                };
              }
              {
                tab = {
                  _props = {
                    name = "git";
                  };
                  _children = [
                    {
                      pane = {
                        command = "lazygit";
                      };
                    }
                  ];
                };
              }
            ];
          };
        };
      };
    };
  };
}
