dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
| 1 | # GTK and cursor theme, as nwg-look had set them on CachyOS (settings.ini, |
| 2 | # .gtkrc-2.0, GSettings), and Qt's: qt6ct with the Kvantum style. |
| 3 | # |
| 4 | # These files are now written by Nix, so change the theme here rather than in |
| 5 | # nwg-look or qt6ct (they can still preview themes, but can't save over these |
| 6 | # files). |
| 7 | { config, pkgs, ... }: |
| 8 | let |
| 9 | inherit (config.lib.dot) link; |
| 10 | in |
| 11 | { |
| 12 | home.pointerCursor = { |
| 13 | enable = true; |
| 14 | name = "BreezeX-Black"; |
| 15 | package = pkgs.breezex-cursor; |
| 16 | size = 28; |
| 17 | gtk.enable = true; |
| 18 | x11.enable = true; |
| 19 | }; |
| 20 | |
| 21 | gtk = { |
| 22 | enable = true; |
| 23 | theme = { |
| 24 | name = "Adwaita-dark"; |
| 25 | package = pkgs.gnome-themes-extra; |
| 26 | }; |
| 27 | iconTheme = { |
| 28 | name = "breeze-dark"; |
| 29 | package = pkgs.kdePackages.breeze-icons; |
| 30 | }; |
| 31 | font = { |
| 32 | name = "Adwaita Sans"; |
| 33 | size = 11; |
| 34 | package = pkgs.adwaita-fonts; |
| 35 | }; |
| 36 | gtk2.extraConfig = '' |
| 37 | gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ |
| 38 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR |
| 39 | gtk-button-images=0 |
| 40 | gtk-menu-images=0 |
| 41 | gtk-enable-event-sounds=1 |
| 42 | gtk-enable-input-feedback-sounds=0 |
| 43 | gtk-xft-antialias=1 |
| 44 | gtk-xft-hinting=1 |
| 45 | gtk-xft-hintstyle="hintslight" |
| 46 | gtk-xft-rgba="rgb" |
| 47 | ''; |
| 48 | gtk3.extraConfig = { |
| 49 | gtk-toolbar-style = "GTK_TOOLBAR_BOTH_HORIZ"; |
| 50 | gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR"; |
| 51 | gtk-button-images = 0; |
| 52 | gtk-menu-images = 0; |
| 53 | gtk-enable-event-sounds = 1; |
| 54 | gtk-enable-input-feedback-sounds = 0; |
| 55 | gtk-xft-antialias = 1; |
| 56 | gtk-xft-hinting = 1; |
| 57 | gtk-xft-hintstyle = "hintslight"; |
| 58 | gtk-xft-rgba = "rgb"; |
| 59 | gtk-application-prefer-dark-theme = 1; |
| 60 | }; |
| 61 | gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; |
| 62 | }; |
| 63 | |
| 64 | dconf.settings."org/gnome/desktop/interface" = { |
| 65 | color-scheme = "prefer-dark"; |
| 66 | gtk-theme = "Adwaita-dark"; |
| 67 | icon-theme = "breeze-dark"; |
| 68 | cursor-theme = "BreezeX-Black"; |
| 69 | cursor-size = 28; |
| 70 | font-name = "Adwaita Sans 11"; |
| 71 | }; |
| 72 | |
| 73 | # QT_QPA_PLATFORMTHEME=qt6ct and QT_STYLE_OVERRIDE=kvantum for the session |
| 74 | # (Hyprland's env also passes the first on, desktop.nix). qt6ct and Kvantum |
| 75 | # themselves are installed system-wide (modules/nixos/desktop.nix). |
| 76 | qt = { |
| 77 | enable = true; |
| 78 | platformTheme.name = "qt6ct"; |
| 79 | style.name = "kvantum"; |
| 80 | |
| 81 | qt6ctSettings = { |
| 82 | Appearance = { |
| 83 | custom_palette = false; |
| 84 | icon_theme = "Papirus-Dark"; |
| 85 | standard_dialogs = "default"; |
| 86 | style = "kvantum"; |
| 87 | }; |
| 88 | Fonts = { |
| 89 | fixed = ''"JetBrainsMono Nerd Font,10,-1,5,50,0,0,0,0,0"''; |
| 90 | general = ''"Noto Sans,10,-1,5,50,0,0,0,0,0"''; |
| 91 | }; |
| 92 | Interface = { |
| 93 | activate_item_on_single_click = 1; |
| 94 | buttonbox_layout = 0; |
| 95 | cursor_flash_time = 1000; |
| 96 | dialog_buttons_have_icons = 1; |
| 97 | double_click_interval = 400; |
| 98 | gui_effects = "@Invalid()"; |
| 99 | keyboard_scheme = 2; |
| 100 | menus_have_icons = true; |
| 101 | show_shortcuts_in_context_menus = true; |
| 102 | stylesheets = "@Invalid()"; |
| 103 | toolbutton_style = 4; |
| 104 | underline_shortcut = 1; |
| 105 | wheel_scroll_lines = 3; |
| 106 | }; |
| 107 | }; |
| 108 | |
| 109 | # The active theme is KvArcDark# (your customised copy of KvArcDark, made |
| 110 | # with Kvantum Manager; it uses the stock theme's artwork). RiceDark is the |
| 111 | # tweaked theme from the old repo, with the stock KvArcDark artwork copied in |
| 112 | # under its name, as kvantum/install.sh did. Both stay linked to the |
| 113 | # checkout. |
| 114 | kvantum = { |
| 115 | enable = true; |
| 116 | settings.General.theme = "KvArcDark#"; |
| 117 | }; |
| 118 | |
| 119 | # KDE apps (Dolphin, Ark) read the style and icons from kdeglobals. Set with |
| 120 | # kwriteconfig6, so the apps can still save their own settings there. |
| 121 | kde.settings.kdeglobals = { |
| 122 | General.widgetStyle = "kvantum"; |
| 123 | Icons.Theme = config.qt.qt6ctSettings.Appearance.icon_theme; |
| 124 | KDE.widgetStyle = "kvantum"; |
| 125 | }; |
| 126 | }; |
| 127 | |
| 128 | xdg.configFile = { |
| 129 | "Kvantum/KvArcDark#/KvArcDark#.kvconfig".source = link "kvantum/KvArcDark#.kvconfig"; |
| 130 | "Kvantum/RiceDark/RiceDark.kvconfig".source = link "kvantum/RiceDark.kvconfig"; |
| 131 | "Kvantum/RiceDark/RiceDark.svg".source = |
| 132 | "/share/Kvantum/KvArcDark/KvArcDark.svg"; |
| 133 | }; |
| 134 | } |