refactor(home): Use new helpers; formatting
This commit is contained in:
parent
2efe270e71
commit
ebc1dbcd69
28 changed files with 254 additions and 268 deletions
|
@ -2,17 +2,19 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.alacritty.rose-pine;
|
||||
enable = cfg.enable && config.programs.alacritty.enable;
|
||||
in {
|
||||
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.alacritty.rose-pine = lib.rp.mkRosePineOpt { name = "alacritty"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
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";
|
||||
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/dist/${themeName}.toml";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,15 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.bat.rose-pine;
|
||||
enable = cfg.enable && config.programs.bat.enable;
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.bat.rose-pine = lib.rp.mkRosePineOpt { name = "bat"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
cfg = config.programs.btop.rose-pine;
|
||||
enable = cfg.enable && config.programs.btop.enable;
|
||||
|
||||
themeFile =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine.theme"
|
||||
else "rose-pine-${cfg.flavor}.theme";
|
||||
themeFile = "${lib.rp.getKebabTheme cfg.flavor}.theme";
|
||||
themePath = "/${themeFile}";
|
||||
theme = sources.btop + themePath;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.btop.rose-pine = lib.rp.mkRosePineOpt { name = "btop"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -2,15 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.cava.rose-pine;
|
||||
enable = cfg.enable && config.programs.cava.enable;
|
||||
flavor =
|
||||
if (cfg.flavor == "main")
|
||||
then "rosepine"
|
||||
else cfg.flavor;
|
||||
in {
|
||||
|
||||
flavor = if (cfg.flavor == "main") then "rosepine" else cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.cava.rose-pine = lib.rp.mkRosePineOpt { name = "cava"; };
|
||||
|
||||
config.programs.cava = lib.mkIf enable {
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib) rp mkIf;
|
||||
|
||||
cfg = config.rose-pine.pointerCursor;
|
||||
flavor =
|
||||
if (cfg.flavor == "dawn")
|
||||
then "Dawn"
|
||||
else "";
|
||||
in {
|
||||
flavor = if (cfg.flavor == "dawn") then "Dawn" else "";
|
||||
in
|
||||
{
|
||||
options.rose-pine.pointerCursor = rp.mkRosePineOpt {
|
||||
name = "pointer cursors";
|
||||
# NOTE: we exclude this from the global `rose-pine.enable` as there is no
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.services.dunst.rose-pine;
|
||||
enable = cfg.enable && config.services.dunst.enable;
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
options.services.dunst.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "dunst";}
|
||||
// {
|
||||
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.services.dunst.rose-pine = lib.rp.mkRosePineOpt { name = "dunst"; } // {
|
||||
prefix = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "00";
|
||||
|
@ -28,7 +27,6 @@ in {
|
|||
# Using a prefix like this is necessary because drop-ins' precedence depends
|
||||
# on lexical order such that later drop-ins override earlier ones.
|
||||
# This way, users have better control over precedence.
|
||||
"dunst/dunstrc.d/${cfg.prefix}-rose-pine.conf".source =
|
||||
sources.dunst + "/${themeName}.conf";
|
||||
"dunst/dunstrc.d/${cfg.prefix}-rose-pine.conf".source = sources.dunst + "/${themeName}.conf";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.i18n.inputMethod.fcitx5.rose-pine;
|
||||
enable = cfg.enable && config.i18n.inputMethod.enabled == "fcitx5";
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
options.i18n.inputMethod.fcitx5.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "Fcitx5";}
|
||||
// {
|
||||
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.i18n.inputMethod.fcitx5.rose-pine = lib.rp.mkRosePineOpt { name = "Fcitx5"; } // {
|
||||
apply = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.fish.rose-pine;
|
||||
enable = cfg.enable && config.programs.fish.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "Rosé Pine"
|
||||
else "Rosé Pine ${lib.rp.mkUpper cfg.flavor}";
|
||||
themeName = "Rosé Pine ${lib.rp.mkUpper (lib.rp.getFlavor cfg.flavor)}";
|
||||
themePath = "/themes/${themeName}.theme";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.fish.rose-pine = lib.rp.mkRosePineOpt { name = "fish"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.foot.rose-pine;
|
||||
enable = cfg.enable && config.programs.foot.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.foot.rose-pine = lib.rp.mkRosePineOpt { name = "foot"; };
|
||||
|
||||
config.programs.foot = lib.mkIf enable {
|
||||
|
|
|
@ -2,14 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.fzf.rose-pine;
|
||||
enable = cfg.enable && config.programs.fzf.enable;
|
||||
palette = (lib.importJSON "${sources.rose-pine-palette}/palette.json").${cfg.flavor}.colors;
|
||||
in {
|
||||
options.programs.fzf.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "fzf";};
|
||||
in
|
||||
{
|
||||
options.programs.fzf.rose-pine = lib.rp.mkRosePineOpt { name = "fzf"; };
|
||||
|
||||
config.programs.fzf.colors =
|
||||
lib.mkIf enable
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
config = {
|
||||
assertions = [ (lib.rp.assertMinimumVersion "24.05") ];
|
||||
};
|
||||
|
@ -18,7 +19,8 @@
|
|||
description = "Global Rose Pine accent";
|
||||
};
|
||||
|
||||
sources = let
|
||||
sources =
|
||||
let
|
||||
defaultSources = import ../../.sources;
|
||||
in
|
||||
lib.mkOption {
|
||||
|
|
|
@ -3,21 +3,20 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
rp
|
||||
mkIf
|
||||
mkMerge
|
||||
;
|
||||
|
||||
cfg = config.gtk.rose-pine;
|
||||
enable = cfg.enable && config.gtk.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.gtk.rose-pine =
|
||||
rp.mkRosePineOpt {
|
||||
name = "gtk";
|
||||
|
@ -39,9 +38,11 @@ in {
|
|||
package = pkgs.rose-pine-gtk-theme;
|
||||
};
|
||||
|
||||
xdg.configFile = let
|
||||
xdg.configFile =
|
||||
let
|
||||
gtk4Dir = "${config.gtk.theme.package}/share/themes/${themeName}/gtk-4.0";
|
||||
in {
|
||||
in
|
||||
{
|
||||
"gtk-4.0/gtk.css".source = "${gtk4Dir}/gtk.css";
|
||||
};
|
||||
})
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
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 {
|
||||
themeName = lib.rp.getSnakeTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.helix.rose-pine = lib.rp.mkRosePineOpt { name = "helix"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -2,20 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.wayland.windowManager.hyprland.rose-pine;
|
||||
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
options.wayland.windowManager.hyprland.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "hyprland";}
|
||||
// {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.wayland.windowManager.hyprland.rose-pine = lib.rp.mkRosePineOpt { name = "hyprland"; } // {
|
||||
accent = lib.rp.mkAccentOpt "hyprland";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.k9s.rose-pine;
|
||||
|
@ -16,7 +17,8 @@
|
|||
themeFile = "rose-pine.yaml";
|
||||
themePath = "k9s/skins/${themeFile}";
|
||||
theme = sources.k9s + "/skin.yml";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.k9s.rose-pine = lib.rp.mkRosePineOpt { name = "k9s"; };
|
||||
|
||||
config = lib.mkIf enable (
|
||||
|
|
|
@ -2,19 +2,18 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.kitty.rose-pine;
|
||||
enable = cfg.enable && config.programs.kitty.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
themePath = "themes/${themeName}.conf";
|
||||
theme = sources.kitty + "/dist/${themeName}.conf";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.kitty.rose-pine = lib.rp.mkRosePineOpt { name = "kitty"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -3,23 +3,21 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.services.mako.rose-pine;
|
||||
enable = cfg.enable && config.services.mako.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
theme = lib.rp.fromINI (sources.mako + "/theme/${themeName}.theme");
|
||||
|
||||
# Settings that need to be extracted and put in extraConfig
|
||||
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;
|
||||
in {
|
||||
options.services.mako.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "mako";};
|
||||
in
|
||||
{
|
||||
options.services.mako.rose-pine = lib.rp.mkRosePineOpt { name = "mako"; };
|
||||
|
||||
# Will cause infinite recursion if config.services.mako is directly set as a
|
||||
# whole.
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.neovim.rose-pine;
|
||||
enable = cfg.enable && config.programs.neovim.enable;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.neovim.rose-pine = lib.rp.mkRosePineOpt { name = "neovim"; };
|
||||
|
||||
config.programs.neovim = lib.mkIf enable {
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.services.polybar.rose-pine;
|
||||
enable = cfg.enable && config.services.polybar.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.services.polybar.rose-pine = lib.rp.mkRosePineOpt { name = "polybar"; };
|
||||
|
||||
config.services.polybar.extraConfig = lib.mkIf enable (
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.rio.rose-pine;
|
||||
enable = cfg.enable && config.programs.rio.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.rio.rose-pine = lib.rp.mkRosePineOpt { name = "rio"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.rofi.rose-pine;
|
||||
enable = cfg.enable && config.programs.rofi.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.rofi.rose-pine = lib.rp.mkRosePineOpt { name = "rofi"; };
|
||||
|
||||
config.programs.rofi = lib.mkIf enable {
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.starship.rose-pine;
|
||||
enable = cfg.enable && config.programs.starship.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.starship.rose-pine = lib.rp.mkRosePineOpt { name = "starship"; };
|
||||
|
||||
config.programs.starship.settings = lib.mkIf enable (
|
||||
|
|
|
@ -2,18 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.wayland.windowManager.sway.rose-pine;
|
||||
enable = cfg.enable && config.wayland.windowManager.sway.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
theme = "${sources.sway}/themes/${themeName}.theme";
|
||||
in {
|
||||
theme = "${sources.sway}/themes/${lib.rp.getKebabTheme cfg.flavor}.theme";
|
||||
in
|
||||
{
|
||||
options.wayland.windowManager.sway.rose-pine = lib.rp.mkRosePineOpt { name = "sway"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
|
@ -2,20 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.swaylock.rose-pine;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.swaylock.rose-pine = {
|
||||
enable =
|
||||
lib.mkEnableOption "Rosé Pine theme"
|
||||
// {
|
||||
enable = lib.mkEnableOption "Rosé Pine theme" // {
|
||||
/*
|
||||
global `rose-pine.enable` purposefully doesn't work here in
|
||||
configurations with a `home.stateVersion` that is >= 23.05
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.tmux.rose-pine;
|
||||
enable = cfg.enable && config.programs.tmux.enable;
|
||||
in {
|
||||
options.programs.tmux.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "tmux";}
|
||||
// {
|
||||
in
|
||||
{
|
||||
options.programs.tmux.rose-pine = lib.rp.mkRosePineOpt { name = "tmux"; } // {
|
||||
extraConfig = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
description = "Additional configuration for the rose-pine plugin.";
|
||||
|
|
|
@ -2,21 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.waybar.rose-pine;
|
||||
enable = cfg.enable && config.programs.waybar.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
styleFile = "${sources.waybar}/${themeName}.css";
|
||||
in {
|
||||
options.programs.waybar.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "waybar";}
|
||||
// {
|
||||
styleFile = "${sources.waybar}/${lib.rp.getKebabTheme cfg.flavor}.css";
|
||||
in
|
||||
{
|
||||
options.programs.waybar.rose-pine = lib.rp.mkRosePineOpt { name = "waybar"; } // {
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"prependImport"
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.zathura.rose-pine;
|
||||
enable = cfg.enable && config.programs.zathura.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
in
|
||||
{
|
||||
options.programs.zathura.rose-pine = lib.rp.mkRosePineOpt { name = "zathura"; };
|
||||
|
||||
config.programs.zathura.extraConfig = lib.mkIf enable ''
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.zellij.rose-pine;
|
||||
enable = cfg.enable && config.programs.zellij.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
themeName = lib.rp.getKebabTheme cfg.flavor;
|
||||
theme = sources.zellij + "/dist/${themeName}.kdl";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.zellij.rose-pine = lib.rp.mkRosePineOpt { name = "zellij"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
|
|
Loading…
Reference in a new issue