summaryrefslogtreecommitdiff
path: root/alacritty/default.nix
blob: c5681b03e8813bddafd39602b23ca2a2d23d2da5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{

  pkgs ? (import ../pkgs.nix) {},
  zsh ? pkgs.zsh,

}: rec {

  # TODO figure out a way to provide my font to alacritty at runtime. fontconfig
  # is a hot mess...
  #
  #dataDir = pkgs.stdenv.mkDerivation {
  #  name = "alacritty-dataDir";
  #  src = ./fonts;
  #  buildInputs = [ pkgs.fontconfig ];
  #  builder = builtins.toFile "builder.sh" ''
  #    source $stdenv/setup
  #    mkdir "$out"
  #    cp -r "$src" "$out"/fonts
  #    chmod -R +w "$out"

  #    env

  #    export FONTCONFIG_FILE="$out"/fontconfig
  #    fc-cache --verbose "$out"/fonts

  #  '';
  #};

  alacritty = pkgs.writeScriptBin "alacritty" ''
    #!${pkgs.bash}/bin/bash
    exec ${pkgs.nixgl}/bin/nixGLIntel ${pkgs.alacritty}/bin/alacritty \
      --config-file ${./alacritty.yml} \
      -e "${zsh}/bin/zsh"
  '';
}