wrapperPackages/dotfiles-wrapped: add Zellij wrapper

This commit is contained in:
Gabriel Arazas 2024-10-04 17:09:08 +08:00
parent 7eb4b43b7b
commit f7e18a3fce
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 19 additions and 22 deletions

View File

@ -4,10 +4,8 @@
# parts from the config are conditionally setting up NixGL wrapping. Though,
# you have to use NixOS systems in order to actually use it. We probably should
# have a specialized launcher for this.
let
sources = import ./npins;
in
{ lib, pkgs, wrapperManagerLib, ... }@moduleArgs:
let sources = import ./npins;
in { lib, pkgs, wrapperManagerLib, ... }@moduleArgs:
let
inherit (sources) dotfiles nixgl;
@ -22,8 +20,7 @@ let
} else {
inherit arg0;
};
in
{
in {
# This wrapper needs runtime expansion which is not possible with binary
# wrappers.
build.variant = "shell";
@ -31,17 +28,13 @@ in
nixgl.src = nixgl;
wrappers.wezterm = lib.mkMerge [
{
env.WEZTERM_CONFIG_FILE.value = getDotfiles "wezterm/wezterm.lua";
}
{ env.WEZTERM_CONFIG_FILE.value = getDotfiles "wezterm/wezterm.lua"; }
(wrapNixGL (lib.getExe' pkgs.wezterm "wezterm"))
];
wrappers.kitty = lib.mkMerge [
{
env.KITTY_CONFIG_DIRECTORY.value = getDotfiles "kitty";
}
{ env.KITTY_CONFIG_DIRECTORY.value = getDotfiles "kitty"; }
(wrapNixGL (lib.getExe' pkgs.kitty "kitty"))
];
@ -56,20 +49,24 @@ in
{
env.EMACSDIR.value = builtins.toString sources.doom-emacs;
env.DOOMDIR.value = getDotfiles "emacs";
env.DOOMPROFILELOADFILE.value = lib.escapeShellArg "$XDG_CACHE_HOME/doom/profiles.el";
env.DOOMPROFILELOADFILE.value =
lib.escapeShellArg "$XDG_CACHE_HOME/doom/profiles.el";
# TODO: This will be removed in Doom Emacs 3.0 as far as I can tell so we'll
# remove it once that happens.
env.DOOMLOCALDIR.value = lib.escapeShellArg "$XDG_CONFIG_HOME/emacs/";
pathAdd = wrapperManagerLib.getBin [
sources.doom-emacs
];
pathAdd = wrapperManagerLib.getBin [ sources.doom-emacs ];
}
(wrapNixGL (lib.getExe' pkgs.emacs "emacs"))
];
wrappers.zellij = {
arg0 = lib.getExe' pkgs.zellij "zellij";
env.ZELLIJ_CONFIG_DIR.value = getDotfiles "zellij";
};
build.extraSetup = ''
install -Dm0755 ${getDotfiles "bin"}/* -t $out/bin
'';

View File

@ -8,9 +8,9 @@
"repo": "doomemacs"
},
"branch": "master",
"revision": "0f30e1eca5f7cb9220d2d1caf4fef7214a86c339",
"url": "https://github.com/doomemacs/doomemacs/archive/0f30e1eca5f7cb9220d2d1caf4fef7214a86c339.tar.gz",
"hash": "004xf0681rizdavl0krpx015h9zyb12ma4gq11nazcy8547qg3kl"
"revision": "8b9168de6e6a9cabf13d1c92558e2ef71aa37a72",
"url": "https://github.com/doomemacs/doomemacs/archive/8b9168de6e6a9cabf13d1c92558e2ef71aa37a72.tar.gz",
"hash": "1b3dwzvxa3svi5bmzwbx847b0g9fggfdjbjacp7vy936x6ld51bc"
},
"dotfiles": {
"type": "Git",
@ -20,9 +20,9 @@
"repo": "dotfiles"
},
"branch": "master",
"revision": "c0c64c9f9dae40c7041933851894e14601b56ba7",
"url": "https://github.com/foo-dogsquared/dotfiles/archive/c0c64c9f9dae40c7041933851894e14601b56ba7.tar.gz",
"hash": "1sm00fxajqhrccbxl5647na4fw9cha6w8jvarg5p4kvs3rrwh5p2"
"revision": "0766497a925b0e87efa7b319e823aeaa77f2e1dd",
"url": "https://github.com/foo-dogsquared/dotfiles/archive/0766497a925b0e87efa7b319e823aeaa77f2e1dd.tar.gz",
"hash": "0435h4cgz9wgyp9j6vygcbxp3i66vn29ab2jqpcpfgligipjnhhm"
},
"nixgl": {
"type": "Git",