From b4b5f008d772c0e8e9c420cfa0d240a447747e0a Mon Sep 17 00:00:00 2001 From: PerchunPak Date: Wed, 25 Jun 2025 09:22:13 +0200 Subject: [PATCH] hyprpanel: deprecate `theme.name` option --- modules/programs/hyprpanel/default.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/modules/programs/hyprpanel/default.nix b/modules/programs/hyprpanel/default.nix index a93f3668..30ac0322 100644 --- a/modules/programs/hyprpanel/default.nix +++ b/modules/programs/hyprpanel/default.nix @@ -91,7 +91,26 @@ in xdg.configFile.hyprpanel = lib.mkIf (cfg.settings != { }) { target = "hyprpanel/config.json"; - source = jsonFormat.generate "hyprpanel-config" cfg.settings; + source = jsonFormat.generate "hyprpanel-config" ( + if cfg.settings ? theme && cfg.settings.theme ? name then + lib.warn '' + `settings.theme.name` option has been removed, because the + hyprpanel module has been ported to downstream home-manager and + implementing it would require IFD + (https://nix.dev/manual/nix/2.26/language/import-from-derivation) + + Replace it with: + ```nix + programs.hyprpanel = { + theme = { + # paste content of https://github.com/Jas-SinghFSU/HyprPanel/blob/2c0c66a/themes/${cfg.settings.theme.name}.json + }; + }; + ``` + '' cfg.settings + else + cfg.settings + ); # hyprpanel replaces it with the same file, but without new line in the end force = true; };