3 Commits

Author SHA1 Message Date
John Lancaster b7f5474893 commented out my-neovim because it's in jsl-zsh 2026-06-10 08:56:50 -05:00
John Lancaster 1667e362aa gpu stuff for zed on x11 2026-06-10 08:56:04 -05:00
John Lancaster cd5a49c4a6 commented out mtls for john-pc 2026-06-10 08:54:08 -05:00
2 changed files with 43 additions and 37 deletions
+12 -12
View File
@@ -39,7 +39,7 @@ in
home.homeDirectory = "/home/${username}"; home.homeDirectory = "/home/${username}";
home.packages = with pkgs; [ home.packages = with pkgs; [
selfPkgs.jsl-zsh selfPkgs.jsl-zsh
selfPkgs.my-neovim # selfPkgs.my-neovim
selfPkgs.ssh-certs selfPkgs.ssh-certs
# selfPkgs.step-bootstrap # selfPkgs.step-bootstrap
# selfPkgs.wg-platform # selfPkgs.wg-platform
@@ -91,17 +91,17 @@ in
"/home/john/john-nas" "/home/john/john-nas"
]; ];
}; };
mtls = { # mtls = {
enable = true; # enable = true;
subject = hostname; # subject = hostname;
san = [ # san = [
"${hostname}" # "${hostname}"
"192.168.1.85" # "192.168.1.85"
"spiffe://john-stream.com/ubuntu" # "spiffe://john-stream.com/ubuntu"
]; # ];
lifetime = "1h"; # lifetime = "1h";
renew.onCalendar = "*:1/10"; # renew.onCalendar = "*:1/10";
}; # };
}; };
flake.homeConfigurations."john@john-pc-ubuntu" = withSystem "x86_64-linux" (ctx@{ system, inputs', ... }: flake.homeConfigurations."john@john-pc-ubuntu" = withSystem "x86_64-linux" (ctx@{ system, inputs', ... }:
+31 -25
View File
@@ -1,33 +1,39 @@
{ self, inputs, ... }: { self, ... }:
let let
packageName = "zed-editor"; packageName = "zed-editor";
vulkanIcd = "/usr/share/vulkan/icd.d/nvidia_icd.json";
zedWrapper = inputs.wrappers.lib.wrapModule ({ config, lib, wlib, ... }: { eglVendor = "/usr/share/glvnd/egl_vendor.d/10_nvidia.json";
options = {
text-to-say = lib.mkOption {
type = lib.types.str;
description = "Text for the ascii cow to say.";
};
};
config = {
binName = "my-pkg";
package = config.pkgs.cowsay;
args = [ config.text-to-say ];
};
});
in in
{ {
perSystem = { system, pkgs, lib, ... }: { perSystem = { pkgs, ... }: {
packages."${packageName}" = (zedWrapper.apply { packages."${packageName}" = pkgs.symlinkJoin {
inherit pkgs; name = "zed-editor-host-gpu";
text-to-say = "Hello from wrapped module!"; paths = [ pkgs.zed-editor ];
}).wrapper; nativeBuildInputs = [ pkgs.makeWrapper ];
meta = pkgs.zed-editor.meta // {
mainProgram = "zeditor";
};
postBuild = ''
for exe in $out/bin/*; do
wrapProgram "$exe" \
--unset WAYLAND_DISPLAY \
--unset GDK_BACKEND \
--set VK_DRIVER_FILES ${vulkanIcd} \
--set VK_ICD_FILENAMES ${vulkanIcd} \
--set __EGL_VENDOR_LIBRARY_FILENAMES ${eglVendor} \
--set __GLX_VENDOR_LIBRARY_NAME nvidia
done
'';
};
}; };
flake.modules.homeManager."${packageName}" = { config, pkgs, lib, ... }: { flake.modules.homeManager.zed-editor = { pkgs, ... }: {
home.packages = [ home.packages = [ pkgs.vulkan-tools ];
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}."${packageName}"
]; programs.zed-editor = {
enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}."${packageName}";
installRemoteServer = true;
};
}; };
} }