fixed gtk theming to use gsettings

This commit is contained in:
2026-07-06 20:01:01 +01:00
parent 196170c8df
commit b8ac7247a5
3 changed files with 91 additions and 68 deletions

View File

@@ -0,0 +1,36 @@
{
self,
inputs,
...
}: {
flake.nixosModules.bibataCursors = {
pkgs,
lib,
...
}: let
in {
fonts.packages = with pkgs.nerd-fonts; [
fira-mono
];
environment.systemPackages = with pkgs; [
bibata-cursors
];
environment.variables = {
XCURSOR_THEME = "Bibata-Modern-Ice";
XCURSOR_SIZE = "20";
};
programs.dconf.profiles.user.databases = [
{
lockAll = false;
settings = {
"org/gnome/desktop/interface" = {
cursor-theme = "Bibata-Modern-Ice";
font-name = "FiraMono Nerd Font 11";
};
};
}
];
};
}

View File

@@ -3,80 +3,17 @@
inputs,
...
}: {
perSystem = {
pkgs,
system,
...
}: {
packages.catppuccinGtkMochaMauve = pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = ["mauve"];
size = "standard";
tweaks = ["rimless"];
};
};
flake.nixosModules.gtkTheme = {
flake.nixosModules.systemTheme = {
config,
pkgs,
lib,
...
}: let
catppuccinGtk = pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = ["mauve"];
size = "standard";
tweaks = ["rimless"];
};
gtkThemeName = "Catppuccin-Mocha-Standard-Mauve-Dark";
gtkSettingsCommon = ''
gtk-application-prefer-dark-theme = true
gtk-theme-name = ${gtkThemeName}
gtk-icon-theme-name = Catppuccin-Mocha-Mauve
gtk-font-name = FiraMono Nerd Font 11
gtk-cursor-theme-name = Bibata-Modern-Ice
gtk-cursor-theme-size = 20
'';
in {
fonts.packages = [pkgs.nerd-fonts.fira-mono];
environment.systemPackages = with pkgs; [
modules = with self.nixosModules; [
bibataCursors
catppuccinGtk
bibata-cursors
catppuccin-icons
];
environment.etc = {
"gtk-3.0/settings.ini".source = pkgs.writeText "gtk3-settings.ini" ''
[Settings]
${gtkSettingsCommon}
'';
"gtk-4.0/settings.ini".source = pkgs.writeText "gtk4-settings.ini" ''
[Settings]
${gtkSettingsCommon}
'';
};
environment.variables = {
XCURSOR_THEME = "Bibata-Modern-Ice";
XCURSOR_SIZE = "20";
};
programs.dconf.profiles.user.databases = [
{
lockAll = false;
settings = {
"org/gnome/desktop/interface" = {
gtk-theme = gtkThemeName;
icon-theme = "Catppuccin-Mocha-Mauve";
cursor-theme = "Bibata-Modern-Ice";
font-name = "FiraMono Nerd Font 11";
};
};
}
];
in {
imports = modules;
};
}

View File

@@ -0,0 +1,50 @@
{
self,
inputs,
...
}: {
flake.nixosModules.catppuccinGtk = {
pkgs,
lib,
...
}: let
modules = [
inputs.catppuccin.nixosModules.catppuccin
];
in {
environment.systemPackages = with pkgs; [
(catppuccin-gtk.override {
variant = "mocha";
accents = ["mauve"];
tweaks = ["rimless"];
size = "compact";
})
(catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "mauve";
})
];
imports = modules;
catppuccin = {
enable = true;
autoEnable = false;
accent = "mauve";
flavor = "mocha";
gtk = {
icon.enable = true;
};
};
programs.dconf.profiles.user.databases = [
{
lockAll = false;
settings = {
"org/gnome/desktop/interface" = {
gtk-theme = "catppuccin-mocha-mauve-compact+rimless";
icon-theme = "Papirus";
color-scheme = "prefer-dark";
};
};
}
];
};
}