configs/alacritty: remove complications and make sure font exists

This commit is contained in:
Aaron Bieber 2024-01-20 20:24:23 -07:00
parent 11befad76e
commit fb6d7df0e7
No known key found for this signature in database

View File

@ -17,30 +17,16 @@ let
};
settingsFormat = pkgs.formats.toml { };
settingsFile = settingsFormat.generate "alacritty.toml" settings;
script = pkgs.writeScriptBin "alacritty-etc" ''
${pkgs.alacritty}/bin/alacritty --config-file ${settingsFile}
'';
in
{
config = {
nixpkgs.overlays = [
(self: super: {
alacritty = super.alacritty.overrideAttrs (old: {
postInstall = old.postInstall + ''
${super.gnused}/bin/sed -i 's#^Exec=alacritty#Exec=alacritty --config-file ${settingsFile}#g' \
extra/linux/Alacritty.desktop
install -D extra/linux/Alacritty.desktop -t $out/share/applications/
'';
});
})
];
environment = {
systemPackages = [
script
];
etc = {
"xdg/alacritty/alacritty.toml".text = builtins.readFile settingsFile;
};
};
fontSet = with pkgs; [
go-font
];
};
}