Personal Nix setup

Fix up wezterm build

Changed files
+151 -7
home
apps
+122 -1
flake.lock
···
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
···
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
···
"original": {
"owner": "nix-community",
"repo": "lanzaboote",
"type": "github"
}
},
···
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nvim-plugins": "nvim-plugins",
-
"verdaccio": "verdaccio"
}
},
"rust-overlay": {
···
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
···
"type": "github"
}
},
"which-key-nvim": {
"flake": false,
"locked": {
···
"owner": "folke",
"ref": "v1.6.0",
"repo": "which-key.nvim",
"type": "github"
}
}
···
"type": "github"
}
},
+
"freetype2": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1687587065,
+
"narHash": "sha256-+Fh+/k+NWL5Ow9sDLtp8Cv/8rLNA1oByQQCIQS/bysY=",
+
"owner": "wez",
+
"repo": "freetype2",
+
"rev": "e4586d960f339cf75e2e0b34aee30a0ed8353c0d",
+
"type": "github"
+
},
+
"original": {
+
"owner": "wez",
+
"repo": "freetype2",
+
"rev": "e4586d960f339cf75e2e0b34aee30a0ed8353c0d",
+
"type": "github"
+
}
+
},
"gitignore": {
"inputs": {
"nixpkgs": [
···
"type": "github"
}
},
+
"harfbuzz": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1711722720,
+
"narHash": "sha256-GdxcAPx5QyniSHPAN1ih28AD9JLUPR0ItqW9JEsl3pU=",
+
"owner": "harfbuzz",
+
"repo": "harfbuzz",
+
"rev": "63973005bc07aba599b47fdd4cf788647b601ccd",
+
"type": "github"
+
},
+
"original": {
+
"owner": "harfbuzz",
+
"ref": "8.4.0",
+
"repo": "harfbuzz",
+
"type": "github"
+
}
+
},
"home-manager": {
"inputs": {
"nixpkgs": [
···
"original": {
"owner": "nix-community",
"repo": "lanzaboote",
+
"type": "github"
+
}
+
},
+
"libpng": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1549245649,
+
"narHash": "sha256-1+cRp0Ungme/OGfc9kGJbklYIWAFxk8Il1M+NV4KSgw=",
+
"owner": "glennrp",
+
"repo": "libpng",
+
"rev": "8439534daa1d3a5705ba92e653eda9251246dd61",
+
"type": "github"
+
},
+
"original": {
+
"owner": "glennrp",
+
"repo": "libpng",
+
"rev": "8439534daa1d3a5705ba92e653eda9251246dd61",
"type": "github"
}
},
···
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nvim-plugins": "nvim-plugins",
+
"verdaccio": "verdaccio",
+
"wezterm": "wezterm"
}
},
"rust-overlay": {
···
"type": "github"
}
},
+
"rust-overlay_2": {
+
"inputs": {
+
"nixpkgs": [
+
"wezterm",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1726280639,
+
"narHash": "sha256-YfLRPlFZWrT2oRLNAoqf7G3+NnUTDdlIJk6tmBU7kXM=",
+
"owner": "oxalica",
+
"repo": "rust-overlay",
+
"rev": "e9f8641c92f26fd1e076e705edb12147c384171d",
+
"type": "github"
+
},
+
"original": {
+
"owner": "oxalica",
+
"repo": "rust-overlay",
+
"type": "github"
+
}
+
},
"systems": {
"locked": {
"lastModified": 1681028828,
···
"type": "github"
}
},
+
"wezterm": {
+
"inputs": {
+
"flake-utils": [
+
"flake-utils"
+
],
+
"freetype2": "freetype2",
+
"harfbuzz": "harfbuzz",
+
"libpng": "libpng",
+
"nixpkgs": [
+
"nixpkgs"
+
],
+
"rust-overlay": "rust-overlay_2",
+
"zlib": "zlib"
+
},
+
"locked": {
+
"dir": "nix",
+
"lastModified": 1726439563,
+
"narHash": "sha256-6aDv7s8cUL/PG/RRIkDlydMFL8xii9Xhw1JXI9G96xs=",
+
"owner": "wez",
+
"repo": "wezterm",
+
"rev": "2d0c5cddc91a9c59aef9a7667d90924e7cedd0ac",
+
"type": "github"
+
},
+
"original": {
+
"dir": "nix",
+
"owner": "wez",
+
"ref": "main",
+
"repo": "wezterm",
+
"type": "github"
+
}
+
},
"which-key-nvim": {
"flake": false,
"locked": {
···
"owner": "folke",
"ref": "v1.6.0",
"repo": "which-key.nvim",
+
"type": "github"
+
}
+
},
+
"zlib": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1484501380,
+
"narHash": "sha256-j5b6aki1ztrzfCqu8y729sPar8GpyQWIrajdzpJC+ww=",
+
"owner": "madler",
+
"repo": "zlib",
+
"rev": "cacf7f1d4e3d44d871b605da3b647f07d718623f",
+
"type": "github"
+
},
+
"original": {
+
"owner": "madler",
+
"ref": "v1.2.11",
+
"repo": "zlib",
"type": "github"
}
}
+9
flake.nix
···
};
};
nvim-plugins = {
url = "github:kitten/system-nvim-plugins.nix";
inputs = {
···
inherit (inputs.language-servers.packages.${self.system})
typescript-language-server
vscode-langservers-extracted;
})
];
in {
···
};
};
+
wezterm = {
+
url = "github:wez/wezterm/main?dir=nix";
+
inputs = {
+
nixpkgs.follows = "nixpkgs";
+
flake-utils.follows = "flake-utils";
+
};
+
};
+
nvim-plugins = {
url = "github:kitten/system-nvim-plugins.nix";
inputs = {
···
inherit (inputs.language-servers.packages.${self.system})
typescript-language-server
vscode-langservers-extracted;
+
wezterm = (inputs.wezterm.packages.${self.system}).default;
})
];
in {
+19 -4
home/apps/wezterm/default.nix
···
-
{ pkgs, helpers, ... } @ inputs:
let
inherit (import ../../../lib/colors.nix inputs) colors mkLuaSyntax;
-
pkg = pkgs.wezterm;
configStr = ''
local font_size = ${if helpers.isDarwin then "14" else "12"};
···
'' + (builtins.readFile ./init.lua);
shellIntegrationStr = ''
-
source "${pkg}/etc/profile.d/wezterm.sh"
'';
in {
-
home.packages = [pkg];
xdg.configFile."wezterm/wezterm.lua".text = configStr;
programs.zsh.initExtra = shellIntegrationStr;
}
···
+
{ pkgs, helpers, lib, ... } @ inputs:
let
+
inherit (pkgs) stdenv;
inherit (import ../../../lib/colors.nix inputs) colors mkLuaSyntax;
+
wezterm = pkgs.wezterm.overrideAttrs (_: {
+
preFixup = lib.optionalString stdenv.isLinux ''
+
patchelf \
+
--add-needed "${pkgs.libGL}/lib/libEGL.so.1" \
+
--add-needed "${pkgs.vulkan-loader}/lib/libvulkan.so.1" \
+
$out/bin/wezterm-gui
+
'' + lib.optionalString stdenv.isDarwin ''
+
mkdir -p "$out/Applications"
+
OUT_APP="$out/Applications/WezTerm.app"
+
cp -r assets/macos/WezTerm.app "$OUT_APP"
+
rm $OUT_APP/*.dylib
+
cp -r assets/shell-integration/* "$OUT_APP"
+
ln -s $out/bin/{wezterm,wezterm-mux-server,wezterm-gui,strip-ansi-escapes} "$OUT_APP"
+
'';
+
});
configStr = ''
local font_size = ${if helpers.isDarwin then "14" else "12"};
···
'' + (builtins.readFile ./init.lua);
shellIntegrationStr = ''
+
source "${wezterm}/etc/profile.d/wezterm.sh"
'';
in {
+
home.packages = [ wezterm ];
xdg.configFile."wezterm/wezterm.lua".text = configStr;
programs.zsh.initExtra = shellIntegrationStr;
}
+1 -2
home/apps/wezterm/init.lua
···
line_height = 1.1,
max_fps = 120,
-
front_end = "WebGpu",
-
enable_wayland = false,
enable_scroll_bar = false,
enable_kitty_keyboard = true,
check_for_updates = false,
···
line_height = 1.1,
max_fps = 120,
+
enable_wayland = true,
enable_scroll_bar = false,
enable_kitty_keyboard = true,
check_for_updates = false,