Compare commits

..

5 Commits

View File

@@ -7,6 +7,33 @@
with lib; let with lib; let
cfg = config.home.shell.zellij; cfg = config.home.shell.zellij;
isEmpty = list: list == []; isEmpty = list: list == [];
plugin = {
options = {
name = mkOption {
type = types.str;
example = "filepicket";
};
location = mkOption {
type = types.nullOr types.str;
example = "zellij:strider";
description = ''
When null, defaults to zellij:`name`
'';
};
config = mkOption {
type = types.nullOr types.attrs;
default = null;
};
};
};
pluginToLines = plugin: let
location =
if plugin ? location
then plugin.location
else "location=\"${plugin.name}\"";
in ''
${plugin.name} ${location}
'';
keybind = { keybind = {
options = { options = {
bind = mkOption { bind = mkOption {
@@ -99,17 +126,15 @@ with lib; let
keybinds = values; keybinds = values;
}; };
in { in {
options.home.shell.zellij = let options.home.shell.zellij = {
jsonFormat = pkgs.formats.yaml {};
in {
enable = mkEnableOption "Enable Zellij"; enable = mkEnableOption "Enable Zellij";
clearDefaultKeybinds = mkEnableOption "Clear default keybinds"; clearDefaultKeybinds = mkEnableOption "Clear default keybinds";
settings = mkOption { settings = mkOption {
inherit (jsonFormat) type; type = (pkgs.formats.yaml {}).type;
default = {}; default = {};
}; };
layouts = mkOption { layouts = mkOption {
inherit (jsonFormat) type; type = (pkgs.formats.yaml {}).type;
default = {}; default = {};
}; };
extraSettings = mkOption { extraSettings = mkOption {