-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b442a5
commit c557ad6
Showing
3 changed files
with
103 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ config, pkgs, lib, ... }: | ||
|
||
{ | ||
options.home-manager.desktop.theme.gtk.enable = lib.mkEnableOption "GTK theme config" // { | ||
default = config.home-manager.desktop.theme.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.theme.gtk.enable { | ||
gtk = { | ||
enable = true; | ||
font = { | ||
package = pkgs.noto-fonts; | ||
name = "Noto Sans"; | ||
}; | ||
iconTheme = { | ||
package = pkgs.nordzy-icon-theme; | ||
name = "Nordzy-dark"; | ||
}; | ||
theme = { | ||
name = "Nordic-bluish-accent"; | ||
package = pkgs.nordic; | ||
}; | ||
}; | ||
|
||
services.xsettingsd = { | ||
enable = true; | ||
settings = with config; { | ||
# When running, most GNOME/GTK+ applications prefer those settings | ||
# instead of *.ini files | ||
"Net/IconThemeName" = gtk.iconTheme.name; | ||
"Net/ThemeName" = gtk.theme.name; | ||
"Gtk/CursorThemeName" = xsession.pointerCursor.name; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ config, pkgs, lib, ... }: | ||
|
||
{ | ||
options.home-manager.desktop.theme.qt.enable = lib.mkEnableOption "Qt theme config" // { | ||
default = config.home-manager.desktop.theme.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.theme.qt.enable { | ||
# TODO: remove after this PR is merged | ||
# https://github.com/nix-community/home-manager/pull/4579 | ||
home.sessionVariables = | ||
let | ||
inherit (config.home) profileDirectory; | ||
qtVersions = with pkgs; [ qt5 qt6 ]; | ||
makeQtPath = prefix: lib.concatStringsSep ":" | ||
(map (qt: "${profileDirectory}/${qt.qtbase.${prefix}}") qtVersions); | ||
in | ||
{ | ||
QT_PLUGIN_PATH = "$QT_PLUGIN_PATH\${QT_PLUGIN_PATH:+:}${makeQtPath "qtPluginPrefix"}"; | ||
QML2_IMPORT_PATH = "$QML2_IMPORT_PATH\${QML2_IMPORT_PATH:+:}${makeQtPath "qtQmlPrefix"}"; | ||
}; | ||
|
||
qt = { | ||
enable = true; | ||
platformTheme = "qtct"; | ||
style.name = "kvantum"; | ||
}; | ||
|
||
xdg.configFile = { | ||
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI { } { | ||
General.theme = "Nordic-bluish-solid"; | ||
}; | ||
"Kvantum" = { | ||
source = "${pkgs.nordic}/share/Kvantum"; | ||
recursive = true; | ||
}; | ||
"qt5ct/qt5ct.conf".text = lib.generators.toINI { } { | ||
Appearance = { | ||
style = "kvantum-dark"; | ||
icon_theme = config.gtk.iconTheme.name; | ||
standard_dialogs = "gtk3"; | ||
}; | ||
Interface = { | ||
activate_item_on_single_click = 0; | ||
double_click_interval = 400; | ||
dialog_buttons_have_icons = 1; | ||
wheel_scroll_lines = 3; | ||
}; | ||
Fonts = { | ||
# Noto Sans Mono 10 | ||
fixed = ''@Variant(\0\0\0@\0\0\0\x1c\0N\0o\0t\0o\0 \0S\0\x61\0n\0s\0 \0M\0o\0n\0o@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)''; | ||
# Noto Sans 10 | ||
general = ''@Variant(\0\0\0@\0\0\0\x12\0N\0o\0t\0o\0 \0S\0\x61\0n\0s@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)''; | ||
}; | ||
}; | ||
"qt6ct/qt6ct.conf".text = config.xdg.configFile."qt5ct/qt5ct.conf".text; | ||
}; | ||
}; | ||
} |