Run nixfmt-rfc-style on repository and add it to Zed config

This commit is contained in:
Jo 2025-05-26 18:06:37 +02:00
parent f5e5adb2fd
commit 45494079c5
41 changed files with 441 additions and 240 deletions

View file

@ -6,19 +6,25 @@
osConfig,
namespace,
...
}: let
}:
let
inherit (lib) mkEnableOption types mkIf;
inherit (self.lib) mkOpt;
palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors;
palette =
(pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json"))
.${config.catppuccin.flavor}.colors;
cfg = config.${namespace}.themes.catppuccin;
in {
in
{
options.${namespace}.themes.catppuccin = {
enable = mkEnableOption "the Catppuccin theme, globally.";
accent = mkOpt types.str "blue" "The accent colour to use.";
flavor = mkOpt types.str "macchiato" "The flavor to use.";
palette = mkOpt (lib.types.attrsOf lib.types.raw) palette "a reference to the current active Catppuccin palette.";
palette =
mkOpt (lib.types.attrsOf lib.types.raw) palette
"a reference to the current active Catppuccin palette.";
};
config = mkIf cfg.enable {

View file

@ -4,7 +4,8 @@
config,
namespace,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf;
catppuccinCfg = config.${namespace}.themes.catppuccin;
@ -104,16 +105,19 @@
};
cfg = config.${namespace}.themes.catppuccin.gtk;
in {
options.${namespace}.themes.catppuccin.gtk = {enable = mkEnableOption "Enable the Catppuccin theme for GTK";};
in
{
options.${namespace}.themes.catppuccin.gtk = {
enable = mkEnableOption "Enable the Catppuccin theme for GTK";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
(colloid-gtk-theme.override {
themeVariants = ["default"];
colorVariants = ["dark"];
sizeVariants = ["standard"];
tweaks = ["catppuccin"];
themeVariants = [ "default" ];
colorVariants = [ "dark" ];
sizeVariants = [ "standard" ];
tweaks = [ "catppuccin" ];
})
];