wrapper-manager/programs/zellij: init

This commit is contained in:
Gabriel Arazas 2024-07-12 13:02:40 +08:00
parent 64621b0b2e
commit 412c663648
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 33 additions and 0 deletions

View File

@ -1,5 +1,6 @@
{
imports = [
./programs/blender.nix
./programs/zellij.nix
];
}

View File

@ -0,0 +1,32 @@
{ lib, pkgs, config, ... }:
let
cfg = config.programs.zellij;
in
{
options.programs.zellij = {
enable = lib.mkEnableOption "Zellij, a terminal multiplexer";
package = lib.mkPackageOption pkgs "zellij" { };
configFile = lib.mkOption {
type = lib.types.path;
description = ''
The configuration file of the Zellij wrapper to be used. This module
will use the environment variable `ZELLIJ_CONFIG_FILE` which would
still allow overriding of the user's own if they choose to.
'';
example = lib.literalExpression ''
./config/zellij/config.kdl
'';
};
};
config = lib.mkIf cfg.enable {
basePackages = [ cfg.package ];
wrappers.zellij = {
arg0 = lib.getExe' cfg.package "zellij";
env.ZELLIJ_CONFIG_FILE = cfg.configFile;
};
};
}