alacritty: Use TOML template for recent versions (#219)

Since version 0.13.0 alacritty has switched to TOML config
file format. For backwards compatibility this patch implements conditional
template format depending on the package version.

Closes #214
This commit is contained in:
xokdvium 2024-01-17 18:12:55 +03:00 committed by GitHub
parent 4ea345211e
commit 2d59480b45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 1 deletions

View file

@ -19,6 +19,22 @@
}
},
"base16-alacritty": {
"flake": false,
"locked": {
"lastModified": 1703982197,
"narHash": "sha256-TNxKbwdiUXGi4Z4chT72l3mt3GSvOcz6NZsUH8bQU/k=",
"owner": "aarowill",
"repo": "base16-alacritty",
"rev": "c95c200b3af739708455a03b5d185d3d2d263c6e",
"type": "github"
},
"original": {
"owner": "aarowill",
"repo": "base16-alacritty",
"type": "github"
}
},
"base16-alacritty-yaml": {
"flake": false,
"locked": {
"lastModified": 1674275109,
@ -31,6 +47,7 @@
"original": {
"owner": "aarowill",
"repo": "base16-alacritty",
"rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7",
"type": "github"
}
},
@ -202,6 +219,7 @@
"inputs": {
"base16": "base16",
"base16-alacritty": "base16-alacritty",
"base16-alacritty-yaml": "base16-alacritty-yaml",
"base16-fish": "base16-fish",
"base16-foot": "base16-foot",
"base16-helix": "base16-helix",

View file

@ -19,6 +19,10 @@
url = "github:aarowill/base16-alacritty";
flake = false;
};
base16-alacritty-yaml = {
url = "github:aarowill/base16-alacritty/63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7";
flake = false;
};
base16-fish = {
url = "github:tomyun/base16-fish";
flake = false;

View file

@ -3,8 +3,12 @@
with config.stylix.fonts;
let
useYaml = (builtins.compareVersions config.programs.alacritty.package.version "0.13.0") < 0;
templateRepo = config.lib.stylix.templates.
"base16-alacritty${if useYaml then "-yaml" else ""}";
themeFile = config.lib.stylix.colors {
templateRepo = config.lib.stylix.templates.base16-alacritty;
inherit templateRepo;
};
in
{

View file

@ -3,6 +3,7 @@ inputs:
config.lib.stylix.templates = {
inherit (inputs)
base16-alacritty
base16-alacritty-yaml
base16-fish
base16-foot
base16-helix