From f7e18a3fceadb1684b381624a8fa567701e78477 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 4 Oct 2024 17:09:08 +0800 Subject: [PATCH] wrapperPackages/dotfiles-wrapped: add Zellij wrapper --- .../dotfiles-wrapped/default.nix | 29 +++++++++---------- .../dotfiles-wrapped/npins/sources.json | 12 ++++---- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/configs/wrapper-manager/dotfiles-wrapped/default.nix b/configs/wrapper-manager/dotfiles-wrapped/default.nix index 993b9d23..32edfce1 100644 --- a/configs/wrapper-manager/dotfiles-wrapped/default.nix +++ b/configs/wrapper-manager/dotfiles-wrapped/default.nix @@ -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 ''; diff --git a/configs/wrapper-manager/dotfiles-wrapped/npins/sources.json b/configs/wrapper-manager/dotfiles-wrapped/npins/sources.json index f43b17f8..db06425b 100644 --- a/configs/wrapper-manager/dotfiles-wrapped/npins/sources.json +++ b/configs/wrapper-manager/dotfiles-wrapped/npins/sources.json @@ -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",