From b79da5a9231fb38fe301d22e288f9f913aa2b04a Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 19 Oct 2024 11:15:31 -0700 Subject: [PATCH] feat(alacritty): Catppuccin -> Rose Pine --- .sources/sources.json | 8 ++++---- modules/home-manager/alacritty.nix | 21 +++++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.sources/sources.json b/.sources/sources.json index f8231ef..3eb9f1e 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -4,13 +4,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "catppuccin", + "owner": "rose-pine", "repo": "alacritty" }, "branch": "main", - "revision": "343cf8d65459ac8f6449cc98dd3648bcbd7e3766", - "url": "https://github.com/catppuccin/alacritty/archive/343cf8d65459ac8f6449cc98dd3648bcbd7e3766.tar.gz", - "hash": "1nh29kkviqp0mz0w7cjmxcp5lgmd4hg5r67fzrvgkg9wgcfidig4" + "revision": "3c3e36eb5225b0eb6f1aa989f9d9e783a5b47a83", + "url": "https://github.com/rose-pine/alacritty/archive/3c3e36eb5225b0eb6f1aa989f9d9e783a5b47a83.tar.gz", + "hash": "1b9ff2a1mmhagmajvq49p2mrb22skdcq3hx6d6pjgk2vxvhhfkrd" }, "bat": { "type": "Git", diff --git a/modules/home-manager/alacritty.nix b/modules/home-manager/alacritty.nix index 5e019f3..6ceea41 100644 --- a/modules/home-manager/alacritty.nix +++ b/modules/home-manager/alacritty.nix @@ -1,13 +1,18 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - cfg = config.programs.alacritty.catppuccin; - enable = cfg.enable && config.programs.alacritty.enable; -in { - options.programs.alacritty.catppuccin = lib.ctp.mkCatppuccinOpt { name = "alacritty"; }; + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; + cfg = config.programs.alacritty.rose-pine; + enable = cfg.enable && config.programs.alacritty.enable; +in { + options.programs.alacritty.rose-pine = lib.rp.mkRosePineOpt {name = "alacritty";}; config = lib.mkIf enable { - programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavor}.toml"; + programs.alacritty.settings = + if (cfg.flavor == "main") + then lib.importTOML "${sources.alacritty}/dist/rose-pine.toml" + else lib.importTOML "${sources.alacritty}/dist/rose-pine-${cfg.flavor}.toml"; }; }