Mirror of https://git.jolheiser.com/zed.drv
0

Configure Feed

Select the types of activity you want to include in your feed.

zed.drv / default.nix
932 B 29 lines
1{ 2 pkgs ? import <nixpkgs> { }, 3}: 4let 5 settings = import ./settings { inherit pkgs; }; 6 jsonSettings = pkgs.writeText "jolheiser-zed-settings.json" (builtins.toJSON settings); 7 zed = 8 x11: 9 pkgs.symlinkJoin { 10 name = "jolheiser-zed"; 11 paths = [ pkgs.zed-editor ]; 12 buildInputs = [ pkgs.makeWrapper ]; 13 postBuild = '' 14 rm $out/bin/zeditor 15 makeWrapper ${pkgs.lib.getExe pkgs.zed-editor} $out/bin/zeditor \ 16 ${pkgs.lib.optionalString x11 "--unset WAYLAND_DISPLAY"} \ 17 --run 'export ZED_DATA_DIR="''${XDG_DATA_HOME:-$HOME/.local/share}/jolheiser-zed"' \ 18 --run 'mkdir -p "$ZED_DATA_DIR/config"' \ 19 --run 'cp -f ${jsonSettings} "$ZED_DATA_DIR/config/settings.json"' \ 20 --add-flags "--user-data-dir \$ZED_DATA_DIR" 21 ''; 22 meta.mainProgram = "zeditor"; 23 }; 24in 25{ 26 default = zed false; 27 zed-wayland = zed false; 28 zed-x11 = zed true; 29}