nixos-config/home/shell/terminal.nix

27 lines
748 B
Nix
Raw Normal View History

2020-06-18 16:25:53 +02:00
{ config, pkgs, lib, ... }:
2020-06-18 16:25:53 +02:00
with pkgs; with lib;
let
yamlToJSON = path: runCommand "yaml.json" { nativeBuildInputs = [ pkgs.ruby ]; } ''
ruby -rjson -ryaml -e "puts YAML.load(ARGF).to_json" < ${path} > $out
'';
in
{
# doesn't yet support font ligatures & undercurls
2020-06-18 16:25:53 +02:00
programs.alacritty = {
enable = true;
package = runCommand "alacritty" {
buildInputs = [ makeWrapper ];
} ''
mkdir $out
ln -s ${alacritty}/* $out
rm $out/bin
makeWrapper ${tabbed}/bin/tabbed $out/bin/alacritty \
--add-flags "-c -n Alacritty" \
--add-flags "${alacritty}/bin/alacritty --embed"
'';
2020-06-18 16:25:53 +02:00
settings = recursiveUpdate {
} (trivial.importJSON (yamlToJSON ./alacritty-gruvbox-dark.yml));
};
}