This commit is contained in:
m3tam3re 2024-10-10 14:52:28 +02:00
parent 6139657197
commit 6c720bdac6
5 changed files with 80 additions and 3 deletions

View File

@ -53,6 +53,7 @@
packages =
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
overlays = import ./overlays {inherit inputs;};
homeManagerModules = import ./modules/home-manager;
nixosConfigurations = {
m3-kratos-vm = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};

View File

@ -1,4 +1,11 @@
{ config, lib, outputs, pkgs, ... }: {
{
config,
lib,
outputs,
pkgs,
...
}: {
imports = builtins.attrValues outputs.homeManagerModules;
nixpkgs = {
# You can add overlays here
overlays = [

View File

@ -26,7 +26,6 @@
home.packages = with pkgs; [
kitty
wofi
zellij-ps
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
@ -81,4 +80,27 @@
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.zellij-ps = {
enable = true;
projectFolders = [
"${config.home.homeDirectory}/.config"
"${config.home.homeDirectory}"
];
layout = ''
layout {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
pane size="70%" command="nvim"
pane split_direction="vertical" {
pane
pane command="unimatrix"
}
pane size=1 borderless=true {
plugin location="zellij:status-bar"
}
}
'';
};
}

View File

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

View 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;
};
}