This commit is contained in:
Charlie Root 2024-08-16 23:31:12 +02:00
commit f2570e4552
9 changed files with 39 additions and 77 deletions

View file

@ -8,7 +8,7 @@
in {
imports = [
./stylix.nix
# ./qt.nix
./qt.nix
./gtk.nix
];

View file

@ -3,57 +3,31 @@
lib,
pkgs,
...
}:
with lib; let
theme = {
package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark-BL";
};
cfg = config.modules.theming.qt;
inherit (config.modules.other.system) username;
}: let
inherit (lib) mkEnableOption mkOption;
inherit (lib.types) str package;
in {
options.modules.theming.qt = {
options.modules.usrEnv.style.qt = {
enable = mkEnableOption "qt theming";
name = mkOption {
description = "qt theme name";
type = types.str;
default = "Catppuccin-Mocha-Dark";
type = str;
};
variant = mkOption {
description = "qt theme variant";
type = types.str;
default = "mocha";
type = str;
};
accentColor = mkOption {
description = "accent colour for qt theme";
type = types.str;
default = "green";
type = str;
};
package = mkOption {
description = "qt theme package";
type = types.package;
};
};
config = mkIf cfg.enable {
environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";};
environment.variables = {
QT_STYLE_OVERRIDE = lib.mkForce "kvantum";
GTK_THEME = theme.name;
};
home-manager.users.${username} = {
qt = {
enable = true;
# style = {
# inherit (cfg) name package;
# };
};
home = {
packages = with pkgs; [
qt5.qttools
libsForQt5.qt5ct
libsForQt5.qtstyleplugin-kvantum
breeze-icons
];
};
default = pkgs.catppuccin-kde;
type = package;
};
};
}

View file

@ -97,12 +97,6 @@ in {
nvidia = mkEnableOption "Nvidia graphics drivers";
amd = mkEnableOption "AMD graphics drivers";
};
hardware = {
nvidia = {
enable = mkEnableOption "Nvidia Nvidia graphics drivers";
};
amd.enable = mkEnableOption "AMD graphics drivers";
};
hardware.bluetooth = {
enable = mkEnableOption "bluetooth modules, drivers and configuration program(s)";

View file

@ -9,21 +9,20 @@
inherit (config.modules.other.system) username;
in {
# A (somewhat) sane list of default fonts to be installed.
fonts.packages = with pkgs;
[
material-design-icons
papirus-icon-theme
(nerdfonts.override {fonts = ["ComicShannsMono"];}) # ComicShanns my beloved
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
corefonts
]
++ optional (extraFonts != null) extraFonts;
fonts.packages = with pkgs; [
material-design-icons
papirus-icon-theme
(nerdfonts.override {fonts = ["ComicShannsMono"];}) # ComicShanns my beloved
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
corefonts
];
# ++ optional (extraFonts != null) extraFonts;
# this fixes emoji stuff
home-manager.users.${username} = {
fontconfig = {
fonts.fontconfig = {
defaultFonts = {
monospace = ["ComicShannsMono Nerd Font" "Noto Color Emoji"];
sansSerif = ["ComicShannsMono Nerd Font" "Noto Color Emoji"];

View file

@ -9,7 +9,7 @@ with lib; let
package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark-BL";
};
cfg = config.modules.style.qt;
cfg = config.modules.usrEnv.style.qt;
inherit (config.modules.other.system) username;
in {
config = mkIf cfg.enable {
@ -38,7 +38,6 @@ in {
qt6Packages.qtstyleplugin-kvantum
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
breeze-icons
];
sessionVariables = {

View file

@ -14,7 +14,7 @@ in {
powerOnBoot = mkIf cfg.powerOnBoot true;
};
home-manager.users.${username}.home.Packages = with pkgs; [
home-manager.users.${username}.home.packages = with pkgs; [
bluetuith
];
};

View file

@ -4,7 +4,7 @@
pkgs,
...
}: let
inherit (config.modules.system.hardware) nvidia amd;
cfg = config.modules.system.hardware;
inherit (lib) mkIf;
in {
config = {
@ -12,24 +12,24 @@ in {
graphics = {
enable = true;
extraPackages = with pkgs;
mkIf amd.enable [
mkIf cfg.amd.enable [
mesa
libva
vaapiVdpa
];
};
};
nvidia = mkIf nvidia.enable {
modesetting.enable = true;
open = false;
powerManagement = {
enable = true;
finegrained = false;
nvidia = mkIf cfg.nvidia.enable {
modesetting.enable = true;
open = false;
powerManagement = {
enable = true;
finegrained = false;
};
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
};
boot.initrd.kernelModules = mkIf amd.enable ["amdgpu"];
services.xserver.videoDrivers = mkIf nvidia.enable ["nvidia"];
boot.initrd.kernelModules = mkIf cfg.amd.enable ["amdgpu"];
services.xserver.videoDrivers = mkIf cfg.nvidia.enable ["nvidia"];
};
}