home, theme: split configuations

This commit is contained in:
Guanran Wang 2023-12-03 20:01:38 +08:00
parent 99b5ec8877
commit 107349d45a
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
3 changed files with 33 additions and 41 deletions

View file

@ -24,6 +24,12 @@
GTK_IM_MODULE = lib.mkForce "wayland"; # use text-input-v3
};
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
"button-layout" = "icon,appmenu:"; # remove csd window buttons
};
};
home.packages = with pkgs; [
pamixer
brightnessctl

View file

@ -15,6 +15,28 @@
};
};
gtk.font.name = "Sans";
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
"titlebar-font" = "Sans Bold";
};
"org/gnome/desktop/interface" = {
"document-font-name" = "Sans";
"monospace-font-name" = "Monospace";
# "font-name" is unneeded
# https://github.com/nix-community/home-manager/blob/8765d4e38aa0be53cdeee26f7386173e6c65618d/modules/misc/gtk.nix#L237C19-L237C19
};
};
xresources.properties = {
# Fonts
"Xft.autohint" = "0";
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintslight";
"Xft.hinting" = "1";
"Xft.antialias" = "1";
"Xft.rgba" = "rgb";
};
home.packages = with pkgs; [
### Inter
inter

View file

@ -28,56 +28,20 @@
};
};
### Font
gtk.font.name = "Sans";
### GTK theme
### GTK
gtk.theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
### Dconf
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
"titlebar-font" = "Sans Bold";
"button-layout" = "icon,appmenu:"; # remove csd window buttons
};
"org/gnome/desktop/interface" = {
"document-font-name" = "Sans";
"monospace-font-name" = "Monospace";
# "font-name" is unneeded
# https://github.com/nix-community/home-manager/blob/8765d4e38aa0be53cdeee26f7386173e6c65618d/modules/misc/gtk.nix#L237C19-L237C19
"clock-format" = "12h";
"color-scheme" = "prefer-dark";
# i want to split dconf but
#
# error: attribute '"org/gnome/desktop/interface"' already defined at /nix/store/cjr3qn1kg0z268dnbmc2vry4sbgqvnvm-source/users/guanranwang/home-manager/nixos/theming.nix:52:5
#
# at /nix/store/cjr3qn1kg0z268dnbmc2vry4sbgqvnvm-source/users/guanranwang/home-manager/nixos/theming.nix:36:5:
#
# 35| };
# 36| "org/gnome/desktop/interface" = {
# | ^
# 37| "document-font-name" = "Sans";
};
};
# Misc
xresources = {
properties = {
# Fonts
"Xft.autohint" = "0";
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintslight";
"Xft.hinting" = "1";
"Xft.antialias" = "1";
"Xft.rgba" = "rgb";
};
extraConfig =
lib.mkIf (config.myFlake.home-manager.colorScheme == "tokyonight")
(builtins.readFile "${pkgs.vimPlugins.tokyonight-nvim}/extras/xresources/tokyonight_night.Xresources");
};
# X11
xresources.extraConfig =
lib.mkIf (config.myFlake.home-manager.colorScheme == "tokyonight")
(builtins.readFile "${pkgs.vimPlugins.tokyonight-nvim}/extras/xresources/tokyonight_night.Xresources");
}