From 7c112e604fbb52d5f84b5bbec2b8a49311e0f923 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 29 Feb 2024 16:40:42 +0000 Subject: [PATCH] Remove all mustache config files Nyxt now gets accentColour and font settings correctly --- home/nyxt/default.mustache | 43 ----------------------------- home/nyxt/default.nix | 55 +++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 home/nyxt/default.mustache diff --git a/home/nyxt/default.mustache b/home/nyxt/default.mustache deleted file mode 100644 index 03a1a014..00000000 --- a/home/nyxt/default.mustache +++ /dev/null @@ -1,43 +0,0 @@ -(define-configuration browser - ((theme - (make-instance - 'theme:theme - :dark-p t - :font-family "Iosevka Nerd Font" - :monospace-font-family "Iosevka Nerd Font" - :text-color "#{{base05-hex}}" - :text-color+ "#{{base05-hex}}" - :text-color- "#{{base05-hex}}" - :contrast-text-color "#{{base00-hex}}" - :background-color "#{{base00-hex}}" - :background-color+ "#{{base00-hex}}" - :background-color- "#{{base00-hex}}" - :on-background-color "#{{base05-hex}}" - :accent-color "#{{base0E-hex}}" - :accent-color+ "#{{base0E-hex}}" - :accent-color- "#{{base0E-hex}}" - :on-accent-color "#{{base00-hex}}" - :primary-color "#{{base0E-hex}}" - :primary-color+ "#{{base0E-hex}}" - :primary-color- "#{{base0E-hex}}" - :on-primary-color "#{{base00-hex}}" - :secondary-color "#{{base03-hex}}" - :secondary-color+ "#{{base03-hex}}" - :secondary-color- "#{{base03-hex}}" - :on-secondary-color "#{{base05-hex}}" - :warning-color "#{{base08-hex}}" - :warning-color+ "#{{base08-hex}}" - :warning-color- "#{{base08-hex}}" - :on-warning-color "#{{base00-hex}}" - :highlight-color "#{{base0A-hex}}" - :highlight-color+ "#{{base0A-hex}}" - :highlight-color- "#{{base0A-hex}}" - :on-highlight-color "#{{base00-hex}}" - :action-color "#{{base0D-hex}}" - :action-color+ "#{{base0D-hex}}" - :action-color- "#{{base0D-hex}}" - :on-action-color "#{{base00-hex}}" - :codeblock-color "#{{base01-hex}}" - :codeblock-color+ "#{{base01-hex}}" - :codeblock-color- "#{{base01-hex}}" - :on-codeblock-color "#{{base05-hex}}")))) diff --git a/home/nyxt/default.nix b/home/nyxt/default.nix index 71ec171d..c8efa0de 100644 --- a/home/nyxt/default.nix +++ b/home/nyxt/default.nix @@ -1,19 +1,62 @@ { config, pkgs, + accentColour ? "base07", ... }: { home.packages = [pkgs.nyxt]; xdg = { configFile = { - "nyxt/config.lisp".text = '' - ;; Import stylix theme - (nyxt::load-lisp "${config.lib.stylix.colors { - template = ./default.mustache; - extension = ".lisp"; - }}") + "nyxt/config.lisp".text = with config.stylix; + with config.lib.stylix.colors.withHashtag; let + accent = config.lib.stylix.colors.withHashtag.${accentColour}; + in '' ;; Import custom configuration (nyxt::load-lisp "${./config.lisp}") + ;; Custom theme using stylix + (define-configuration + browser + ((theme (make-instance + 'theme:theme + :dark-p t + :font-family "${fonts.sansSerif.name}" + :monospace-font-family "${fonts.monospace.name}" + :text-color "${base05}" + :text-color+ "${base05}" + :text-color- "${base05}" + :contrast-text-color "${base00}" + :background-color "${base00}" + :background-color+ "${base00}" + :background-color- "${base00}" + :on-background-color "${base05}" + :accent-color "${accent}" + :accent-color+ "${accent}" + :accent-color- "${accent}" + :on-accent-color "${base00}" + :primary-color "${accent}" + :primary-color+ "${accent}" + :primary-color- "${accent}" + :on-primary-color "${base00}" + :secondary-color "${base03}" + :secondary-color+ "${base03}" + :secondary-color- "${base03}" + :on-secondary-color "${base05}" + :warning-color "${base08}" + :warning-color+ "${base08}" + :warning-color- "${base08}" + :on-warning-color "${base00}" + :highlight-color "${base0A}" + :highlight-color+ "${base0A}" + :highlight-color- "${base0A}" + :on-highlight-color "${base00}" + :action-color "${base0D}" + :action-color+ "${base0D}" + :action-color- "${base0D}" + :on-action-color "${base00}" + :codeblock-color "${base01}" + :codeblock-color+ "${base01}" + :codeblock-color- "${base01}" + :on-codeblock-color "${base05}")))) ''; }; dataFile."nyxt/bookmarks.lisp".source = ./bookmarks.lisp;