Move configure-gtk script setting to gtk expression
This commit is contained in:
parent
ec95c63f42
commit
bd4746ff14
|
@ -1,24 +1,6 @@
|
||||||
{ config, lib, pkgs, hyprland, anyrun, wallpapers, catppuccin-themes, ... }:
|
{ config, lib, pkgs, hyprland, anyrun, wallpapers, catppuccin-themes, ... }:
|
||||||
let
|
|
||||||
configure-gtk = pkgs.writeTextFile {
|
{
|
||||||
name = "configure-gtk";
|
|
||||||
destination = "/bin/configure-gtk";
|
|
||||||
executable = true;
|
|
||||||
text = let
|
|
||||||
schema = pkgs.gsettings-desktop-schemas;
|
|
||||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
|
||||||
gtk-theme = config.gtk.theme.name;
|
|
||||||
icon-theme = config.gtk.iconTheme.name;
|
|
||||||
cursor-theme = config.gtk.cursorTheme.name;
|
|
||||||
in ''
|
|
||||||
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
|
||||||
gnome_schema=org.gnome.desktop.interface
|
|
||||||
gsettings set $gnome_schema gtk-theme '${gtk-theme}'
|
|
||||||
gsettings set $gnome_schema icon-theme '${icon-theme}'
|
|
||||||
gsettings set $gnome_schema cursor-theme '${cursor-theme}'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
hyprland.homeManagerModules.default
|
hyprland.homeManagerModules.default
|
||||||
../alacritty/tiling.nix
|
../alacritty/tiling.nix
|
||||||
|
@ -29,7 +11,7 @@ in {
|
||||||
./swaylock.nix
|
./swaylock.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
];
|
];
|
||||||
home.packages = with pkgs; [ libsForQt5.polkit-kde-agent configure-gtk ];
|
home.packages = [ pkgs.libsForQt5.polkit-kde-agent ];
|
||||||
programs = {
|
programs = {
|
||||||
emacs.package = pkgs.emacs29-pgtk;
|
emacs.package = pkgs.emacs29-pgtk;
|
||||||
firefox.package = pkgs.firefox-wayland;
|
firefox.package = pkgs.firefox-wayland;
|
||||||
|
|
|
@ -1,7 +1,30 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
{
|
configure-gtk = pkgs.writeTextFile {
|
||||||
home.packages = with pkgs; [ glib gnome.adwaita-icon-theme papirus-folders ];
|
name = "configure-gtk";
|
||||||
|
destination = "/bin/configure-gtk";
|
||||||
|
executable = true;
|
||||||
|
text = let
|
||||||
|
schema = pkgs.gsettings-desktop-schemas;
|
||||||
|
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||||
|
gtk-theme = config.gtk.theme.name;
|
||||||
|
icon-theme = config.gtk.iconTheme.name;
|
||||||
|
cursor-theme = config.gtk.cursorTheme.name;
|
||||||
|
in ''
|
||||||
|
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||||
|
gnome_schema=org.gnome.desktop.interface
|
||||||
|
gsettings set $gnome_schema gtk-theme '${gtk-theme}'
|
||||||
|
gsettings set $gnome_schema icon-theme '${icon-theme}'
|
||||||
|
gsettings set $gnome_schema cursor-theme '${cursor-theme}'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
glib
|
||||||
|
configure-gtk
|
||||||
|
gnome.adwaita-icon-theme
|
||||||
|
papirus-folders
|
||||||
|
];
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
|
|
Loading…
Reference in a new issue