first
This commit is contained in:
6
modules/home-manager/cli/default.nix
Normal file
6
modules/home-manager/cli/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
# CLI/Terminal-related Home Manager modules
|
||||
{
|
||||
imports = [
|
||||
./zellij-ps.nix
|
||||
];
|
||||
}
|
45
modules/home-manager/cli/zellij-ps.nix
Normal file
45
modules/home-manager/cli/zellij-ps.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.cli.zellij-ps;
|
||||
in {
|
||||
options.cli.zellij-ps = {
|
||||
enable = mkEnableOption "Zellij Project Selector";
|
||||
|
||||
projectFolders = mkOption {
|
||||
type = types.listOf types.path;
|
||||
description = "List of project folders for zellij-ps.";
|
||||
default = ["${config.home.homeDirectory}/projects"];
|
||||
};
|
||||
|
||||
layout = mkOption {
|
||||
type = 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