GTK GTK GTK

This commit is contained in:
2026-03-16 18:58:51 +00:00
parent c879b838a0
commit 9d57603660
5 changed files with 175 additions and 26 deletions
+100 -2
View File
@@ -193,6 +193,8 @@ outputs =
lib.nixosSystem { lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
# Importing Catppuccino mocha
./generated/out_of_tree/core/theme.nix
# Import machine-specific configurations # Import machine-specific configurations
./generated/out_of_tree/machines/traveldroid/top.nix ./generated/out_of_tree/machines/traveldroid/top.nix
# Catppuccin theme module # Catppuccin theme module
@@ -606,6 +608,40 @@ This sets audiosystem for this machine
} }
#+END_SRC #+END_SRC
** =generated/out_of_tree/core/theme.nix=
I use the [[https://catppuccin.com/][Catppuccin]] almost everywhere. The nix module integrates almost automatically everywhere (except gtk).
You'll notice the color values in multiple places outside this as well.
#+BEGIN_SRC nix :tangle generated/system/core/theme.nix :noweb tangle :mkdirp yes :eval never-html
{ pkgs, ... }:
{
gtk = {
enable = true;
colorScheme = "dark";
theme = {
name = "Catppuccin-GTK-Grey-Dark-Compact";
package = (pkgs.magnetic-catppuccin-gtk.override {
accent = [ "grey" ];
shade = "dark";
tweaks = [ "black" ];
size = "compact";
});
};
iconTheme.name = "Papirus-Dark";
};
catppuccin = {
enable = true;
flavor = "mocha";
accent = "blue";
gtk = {
icon.enable = true;
};
cursors.enable = true;
};
}
#+END_SRC
** =generated/out_of_tree/machines/traveldroid/xdg.nix= ** =generated/out_of_tree/machines/traveldroid/xdg.nix=
This sets the XDG implementation This sets the XDG implementation
#+BEGIN_SRC nix :tangle generated/out_of_tree/machines/traveldroid/xdg.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/out_of_tree/machines/traveldroid/xdg.nix :noweb tangle :mkdirp yes :eval never-html
@@ -616,9 +652,38 @@ This sets the XDG implementation
config.system.default = [ "hyprland" "gtk" ]; config.system.default = [ "hyprland" "gtk" ];
}; };
} }
#+END_SRC #+END_SRC
** =generated/out_of_tree/core/gtk.nix=
I use the [[https://catppuccin.com/][Catppuccin]] almost everywhere. The nix module integrates almost automatically everywhere (except gtk).
You'll notice the color values in multiple places outside this as well.
#+BEGIN_SRC nix :tangle generated/system/out_of_tree/gtk.nix :noweb tangle :mkdirp yes :eval never-html
{ pkgs, user, ... }:
{
home-manager.users.${user.username} = {
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Standard-Blue-Dark";
package = pkgs.magnetic-catppuccin-gtk;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
};
}
#+END_SRC
* Now we reach the top of the hierarchy which will call all other imports * Now we reach the top of the hierarchy which will call all other imports
** =generated/top.nix= ** =generated/top.nix=
@@ -1006,7 +1071,6 @@ This is top file of this level which contains just an import statement for all r
./login-tuigreeter.nix ./login-tuigreeter.nix
#./login-lightdm.nix #./login-lightdm.nix
./fonts.nix ./fonts.nix
./gtk.nix
]; ];
} }
#+END_SRC #+END_SRC
@@ -1040,6 +1104,40 @@ You'll notice the color values in multiple places outside this as well.
} }
#+END_SRC #+END_SRC
** =generated/system/core/theme.nix=
I use the [[https://catppuccin.com/][Catppuccin]] almost everywhere. The nix module integrates almost automatically everywhere (except gtk).
You'll notice the color values in multiple places outside this as well.
#+BEGIN_SRC nix :tangle generated/system/core/theme.nix :noweb tangle :mkdirp yes :eval never-html
{ pkgs, ... }:
{
gtk = {
enable = true;
colorScheme = "dark";
theme = {
name = "Catppuccin-GTK-Grey-Dark-Compact";
package = (pkgs.magnetic-catppuccin-gtk.override {
accent = [ "grey" ];
shade = "dark";
tweaks = [ "black" ];
size = "compact";
});
};
iconTheme.name = "Papirus-Dark";
};
catppuccin = {
enable = true;
flavor = "mocha";
accent = "blue";
gtk = {
icon.enable = true;
};
cursors.enable = true;
};
}
#+END_SRC
** =generated/system/core/fonts.nix= ** =generated/system/core/fonts.nix=
This file installs and configures fonts This file installs and configures fonts
+2
View File
@@ -49,6 +49,8 @@ outputs =
lib.nixosSystem { lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
# Importing Catppuccino mocha
./generated/out_of_tree/core/theme.nix
# Import machine-specific configurations # Import machine-specific configurations
./generated/out_of_tree/machines/traveldroid/top.nix ./generated/out_of_tree/machines/traveldroid/top.nix
# Catppuccin theme module # Catppuccin theme module
+50 -23
View File
@@ -1,30 +1,57 @@
{ pkgs, ...}: { pkgs, ... }:
{
environment.systemPackages = with pkgs; [
magnetic-catppuccin-gtk
];
{
gtk = { gtk = {
enable = true; enable = true;
theme = { colorScheme = "dark";
name = "Catppuccin-Mocha-Standard-Blue-Dark"; theme = {
package = pkgs.magnetic-catppuccin-gtk; name = "Catppuccin-GTK-Grey-Dark-Compact";
}; package = (pkgs.magnetic-catppuccin-gtk.override {
iconTheme = { accent = [ "grey" ];
name = "Papirus-Dark"; shade = "dark";
package = pkgs.papirus-icon-theme; tweaks = [ "black" ];
}; size = "compact";
gtk3.extraConfig = { });
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
}; };
iconTheme.name = "Papirus-Dark";
}; };
catppuccin.enable = true; catppuccin = {
catppuccin.flavor = "mocha"; enable = true;
catppuccin.accent = "blue"; flavor = "mocha";
catppuccin.gtk.icon.enable = true; accent = "blue";
catppuccin.cursors.enable = true; gtk = {
icon.enable = true;
};
cursors.enable = true;
};
}
{ pkgs, ... }:
{
gtk = {
enable = true;
colorScheme = "dark";
theme = {
name = "Catppuccin-GTK-Grey-Dark-Compact";
package = (pkgs.magnetic-catppuccin-gtk.override {
accent = [ "grey" ];
shade = "dark";
tweaks = [ "black" ];
size = "compact";
});
};
iconTheme.name = "Papirus-Dark";
};
catppuccin = {
enable = true;
flavor = "mocha";
accent = "blue";
gtk = {
icon.enable = true;
};
cursors.enable = true;
};
} }
-1
View File
@@ -7,6 +7,5 @@
./login-tuigreeter.nix ./login-tuigreeter.nix
#./login-lightdm.nix #./login-lightdm.nix
./fonts.nix ./fonts.nix
./gtk.nix
]; ];
} }
@@ -0,0 +1,23 @@
{ pkgs, user, ... }:
{
home-manager.users.${user.username} = {
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Standard-Blue-Dark";
package = pkgs.magnetic-catppuccin-gtk;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
};
}