This repository has been archived on 2024-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
home-manager/programs/nyxt/default.nix

46 lines
1.9 KiB
Nix
Raw Normal View History

{
config,
pkgs,
fonts,
accentColourName,
altAccentColourName,
...
}: {
home.packages = [pkgs.nyxt];
xdg = {
configFile = {
"nyxt/config.lisp".text = let
sc = config.scheme.withHashtag;
in ''
;; Import custom configuration
(nyxt::load-lisp "${./config.lisp}")
;; Define custom theme
(define-configuration browser
((theme (make-instance 'theme:theme
:dark-p t
:font-family "${fonts.sansSerif.name}"
:monospace-font-family "${fonts.monospace.name}"
:background-color "${sc.base00}"
:on-background-color "${sc.base05}"
:primary-color "${sc.${accentColourName}}"
:on-primary-color "${sc.base01}"
:secondary-color "${sc.base03}"
:on-secondary-color "${sc.base05}"
:accent-color "${sc.${altAccentColourName}}"
:on-accent-color "${sc.base01}"
:action-color "${sc.cyan}"
:on-action-color "${sc.base01}"
:success-color "${sc.green}"
:on-success-color "${sc.base01}"
:highlight-color "${sc.magenta}"
:on-highlight-color "${sc.base01}"
:warning-color "${sc.yellow}"
:on-warning-color "${sc.base01}"
:codeblock-color "${sc.base02}"
:on-codeblock-color "${sc.base05}"))))
'';
};
# dataFile."nyxt/bookmarks.lisp".source = ./bookmarks.lisp;
};
}