diff --git a/.sources/sources.json b/.sources/sources.json index 2b1a37d..acf2442 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -184,13 +184,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "catppuccin", + "owner": "rose-pine", "repo": "helix" }, "branch": "main", - "revision": "7e468da5dbdd54c7504519499f82c4862af472fd", - "url": "https://github.com/catppuccin/helix/archive/7e468da5dbdd54c7504519499f82c4862af472fd.tar.gz", - "hash": "0xwdvbjlhlkhcj7mjc954gfkm6a978a0xn64i7yy674pzs8x90xq" + "revision": "15e1ff4ff7c59bf8d75d648d652112acb1efc412", + "url": "https://github.com/rose-pine/helix/archive/15e1ff4ff7c59bf8d75d648d652112acb1efc412.tar.gz", + "hash": "1gmvjks39spz1lmv1b1f1jgpfjhsg603gc2dxs5hzj93vmlbl7ph" }, "hyprland": { "type": "Git", diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index 4b3b55c..2a3f0e3 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -1,26 +1,28 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - cfg = config.programs.helix.catppuccin; - enable = cfg.enable && config.programs.helix.enable; -in { - options.programs.helix.catppuccin = lib.ctp.mkCatppuccinOpt { name = "helix"; } // { - useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix"; - }; + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; + + cfg = config.programs.helix.rose-pine; + enable = cfg.enable && config.programs.helix.enable; + + themeName = + if (cfg.flavor == "main") + then "rose_pine" + else "rose_pine_${cfg.flavor}"; +in { + options.programs.helix.rose-pine = lib.rp.mkRosePineOpt {name = "helix";}; config = lib.mkIf enable { - programs.helix = - let - subdir = if cfg.useItalics then "default" else "no_italics"; - in - { - settings = { - theme = "catppuccin-${cfg.flavor}"; - editor.color-modes = lib.mkDefault true; - }; - - themes."catppuccin-${cfg.flavor}" = lib.importTOML "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavor}.toml"; + programs.helix = { + settings = { + theme = themeName; + editor.color-modes = lib.mkDefault true; }; + + themes."${themeName}" = lib.importTOML "${sources.helix}/${themeName}.toml"; + }; }; }