Compare commits

...

3 commits

4 changed files with 42 additions and 16 deletions

View file

@ -4,8 +4,28 @@
};
home.packages = with pkgs; [
zed-editor
## GENERAL
youtube-music
discord
ghostty
teams-for-linux
enpass
## WEB
firefox
ungoogled-chromium
## EDITORS
nano
zed-editor
apostrophe
jetbrains.phpstorm
arduino-ide
obsidian
## RUNTIMES and CLIs for development
bun
git
];
home.stateVersion = "25.05";

View file

@ -1,6 +1,7 @@
{
lib,
self,
pkgs,
config,
osConfig,
namespace,
@ -9,12 +10,15 @@
inherit (lib) mkEnableOption types mkIf;
inherit (self.lib) mkOpt;
palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors;
cfg = config.${namespace}.themes.catppuccin;
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.";
};
config = mkIf cfg.enable {
@ -28,6 +32,8 @@ in {
cursors.flavor = cfg.flavor;
};
${namespace}.themes.catppuccin.gtk.enable = mkIf osConfig.${namespace}.desktop.gnome.enable true;
${namespace}.themes.catppuccin = {
gtk.enable = mkIf osConfig.${namespace}.desktop.gnome.enable true;
};
};
}

View file

@ -1,14 +0,0 @@
{
lib,
pkgs,
config,
namespace,
...
}: let
inherit (lib) mkOption mkIf;
palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors;
in {
options.${namespace}.themes.catppuccin.palette = mkOption {type = lib.types.attrsOf lib.types.raw;};
config.${namespace}.themes.catppuccin.palette = mkIf config.${namespace}.themes.catppuccin.enable palette;
}

View file

@ -0,0 +1,14 @@
{...}: {
# Todo: rewrite as recursive operation, based on ${namespace}.users
system.userActivationScripts = {
removeConflictingHomeManagerBackups = {
text = ''
rm -f /home/jo/.gtkrc-2.0.homeManagerBackupFileExtension
rm -f /home/jo/.config/gtk-3.0/gtk.css.homeManagerBackupFileExtension
rm -f /home/jo/.config/gtk-4.0/gtk.css.homeManagerBackupFileExtension
'';
};
};
home-manager.backupFileExtension = "homeManagerBackupFileExtension";
}