From 6c382b2867a8bd7b055bf7b9f17669d797b6077b Mon Sep 17 00:00:00 2001 From: Ulises Britos <45952970+repparw@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:55:12 -0300 Subject: [PATCH] obsidian: normalize 'either' polarity variant to 'light' (#2288) Link: https://github.com/nix-community/stylix/pull/2288 Reviewed-by: https://github.com/TheColorman Reviewed-by: 0xda157 Reviewed-by: Noah Biewesch --- modules/obsidian/hm.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/obsidian/hm.nix b/modules/obsidian/hm.nix index 9ed3ab15..baf9ad36 100644 --- a/modules/obsidian/hm.nix +++ b/modules/obsidian/hm.nix @@ -32,12 +32,15 @@ mkTarget { colors, polarity, }: + let + polarity' = if polarity == "dark" then polarity else "light"; + in { programs.obsidian.defaultSettings.cssSnippets = with colors.withHashtag; [ { name = "Stylix Config"; text = '' - .theme-${polarity} { + .theme-${polarity'} { /* Base Colors */ --color-base-00: ${base00}; --color-base-05: ${base00}; @@ -63,7 +66,7 @@ mkTarget { { name = "Stylix Config"; text = '' - .theme-${polarity} { + .theme-${polarity'} { /* Base Colors */ --color-base-00: ${base00}; --color-base-05: ${base00};