here we go
This commit is contained in:
3
modules/home-manager/default.nix
Normal file
3
modules/home-manager/default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
zellij-ps = import ./zellij-ps.nix;
|
||||
}
|
44
modules/home-manager/zellij-ps.nix
Normal file
44
modules/home-manager/zellij-ps.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.programs.zellij-ps;
|
||||
in {
|
||||
options = {
|
||||
programs.zellij-ps = {
|
||||
enable = mkEnableOption "Zellij Project Selector";
|
||||
projectFolders = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
description = "List of project folders for zellij-ps.";
|
||||
default = ["${config.home.homeDirectory}/projects"];
|
||||
};
|
||||
layout = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Layout for zellij";
|
||||
default = ''
|
||||
layout {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
pane
|
||||
pane split_direction="vertical" {
|
||||
pane
|
||||
pane command="htop"
|
||||
}
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [pkgs.zellij-ps];
|
||||
home.sessionVariables.PROJECT_FOLDERS = lib.concatStringsSep ":" cfg.projectFolders;
|
||||
home.file.".config/zellij/layouts/zellij-ps.kdl".text = cfg.layout;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user