Compare commits

..

5 Commits

View File

@@ -7,33 +7,6 @@
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 {
@@ -126,15 +99,17 @@ with lib; let
keybinds = values; keybinds = values;
}; };
in { in {
options.home.shell.zellij = { options.home.shell.zellij = let
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 {
type = (pkgs.formats.yaml {}).type; inherit (jsonFormat) type;
default = {}; default = {};
}; };
layouts = mkOption { layouts = mkOption {
type = (pkgs.formats.yaml {}).type; inherit (jsonFormat) type;
default = {}; default = {};
}; };
extraSettings = mkOption { extraSettings = mkOption {