treewide: format using nixfmt

Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
This commit is contained in:
Bloxx12 2025-07-20 01:23:48 +02:00
commit e641dfa114
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
113 changed files with 1545 additions and 1019 deletions

View file

@ -3,7 +3,8 @@
lib,
pkgs,
...
}: let
}:
let
inherit (builtins) toString isBool;
inherit (lib.generators) toINI;
inherit (lib.modules) mkIf;
@ -15,12 +16,12 @@
cfg = config.modules.theming.gtk;
toGtk3Ini = toINI {
mkKeyValue = key: value: let
value' =
if isBool value
then boolToString value
else toString value;
in "${escape ["="] key}=${value'}";
mkKeyValue =
key: value:
let
value' = if isBool value then boolToString value else toString value;
in
"${escape [ "=" ] key}=${value'}";
};
gtkIni = {
@ -34,7 +35,8 @@
gtk-cursor-theme-name = "BreezeX-RosePine-Linux";
gtk-theme-name = "Gruvbox-Dark";
};
in {
in
{
options.modules.theming.gtk = {
enable = mkEnableOption "Wether to enable GTK theming";
theme = {
@ -63,15 +65,15 @@ in {
};
};
};
config = let
cursorSize = 32;
in
config =
let
cursorSize = 32;
in
mkIf cfg.enable {
programs.dconf.enable = true;
environment = {
systemPackages = builtins.attrValues {
inherit
(pkgs)
inherit (pkgs)
rose-pine-cursor
gruvbox-gtk-theme
papirus-icon-theme
@ -83,31 +85,33 @@ in {
XCURSOR_THEME = "BreezeX-RosePine-Linux";
XCURSOR_SIZE = cursorSize;
};
etc = let
css = import ./gtk-colors.nix {inherit (config.modules.style.colorScheme) colors;};
in {
"xdg/gtk-4.0/settings.ini".text = toGtk3Ini {
Settings = gtkIni;
};
"xdg/gtk-3.0/settings.ini".text = toGtk3Ini {
Settings = gtkIni;
};
"xdg/gtk-4.0/gtk.css".text = css;
"xdg/gtk-3.0/gtk.css".text = css;
etc =
let
css = import ./gtk-colors.nix { inherit (config.modules.style.colorScheme) colors; };
in
{
"xdg/gtk-4.0/settings.ini".text = toGtk3Ini {
Settings = gtkIni;
};
"xdg/gtk-3.0/settings.ini".text = toGtk3Ini {
Settings = gtkIni;
};
"xdg/gtk-4.0/gtk.css".text = css;
"xdg/gtk-3.0/gtk.css".text = css;
"xdg/gtk-2.0/gtkrc".text = ''
gtk-cursor-theme-name = BreezeX-RosePine-Linux
gtk-cursor-theme-size = ${toString cursorSize}
gtk-theme-name = ${cfg.theme.name}
gtk-icon-theme-name = ${cfg.iconTheme.name}
gtk-font-name = Lexend 11
'';
"xdg/gtk-2.0/gtkrc".text = ''
gtk-cursor-theme-name = BreezeX-RosePine-Linux
gtk-cursor-theme-size = ${toString cursorSize}
gtk-theme-name = ${cfg.theme.name}
gtk-icon-theme-name = ${cfg.iconTheme.name}
gtk-font-name = Lexend 11
'';
"xdg/Xresources".text = ''
Xcursor.size: ${toString cursorSize}
Xcursor.theme: BreezeX-RosePine-Linux
'';
};
"xdg/Xresources".text = ''
Xcursor.size: ${toString cursorSize}
Xcursor.theme: BreezeX-RosePine-Linux
'';
};
};
};
}