beginning of bigger restructure, m3ta-nixpkgs input

This commit is contained in:
m3tam3re
2025-10-03 19:14:37 +02:00
parent b66553888b
commit 6cd1fdd651
12 changed files with 59 additions and 157 deletions

View File

@@ -1,3 +1,3 @@
{
#zellij-ps = import ./zellij-ps.nix;
#module = import ./module.nix;
}

View File

@@ -1,44 +0,0 @@
{
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;
};
}