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

@ -29,7 +29,6 @@
modules = { modules = {
system = { system = {
hardware = { hardware = {
nvidia.enable = true;
bluetooth = { bluetooth = {
enable = true; enable = true;
powerOnBoot = false; powerOnBoot = false;
@ -75,6 +74,7 @@
}; };
style = { style = {
gtk.enable = true; gtk.enable = true;
qt.enable = true;
stylix = { stylix = {
enable = false; enable = false;
scheme = "${pkgs.base16-schemes}/share/themes/bright.yaml"; scheme = "${pkgs.base16-schemes}/share/themes/bright.yaml";

View file

@ -14,12 +14,8 @@ in {
bluetuith bluetuith
bluez bluez
#botany #botany
broot
browsh
bun
cachix cachix
calc calc
calcure
calibre calibre
cbonsai cbonsai
cmake cmake

View file

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

View file

@ -3,57 +3,31 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: let
with lib; let inherit (lib) mkEnableOption mkOption;
theme = { inherit (lib.types) str package;
package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark-BL";
};
cfg = config.modules.theming.qt;
inherit (config.modules.other.system) username;
in { in {
options.modules.theming.qt = { options.modules.usrEnv.style.qt = {
enable = mkEnableOption "qt theming"; enable = mkEnableOption "qt theming";
name = mkOption { name = mkOption {
description = "qt theme name"; description = "qt theme name";
type = types.str; default = "Catppuccin-Mocha-Dark";
type = str;
}; };
variant = mkOption { variant = mkOption {
description = "qt theme variant"; description = "qt theme variant";
type = types.str; default = "mocha";
type = str;
}; };
accentColor = mkOption { accentColor = mkOption {
description = "accent colour for qt theme"; description = "accent colour for qt theme";
type = types.str; default = "green";
type = str;
}; };
package = mkOption { package = mkOption {
description = "qt theme package"; description = "qt theme package";
type = types.package; default = pkgs.catppuccin-kde;
}; type = 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
];
};
}; };
}; };
} }

View file

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

View file

@ -9,21 +9,20 @@
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
in { in {
# A (somewhat) sane list of default fonts to be installed. # A (somewhat) sane list of default fonts to be installed.
fonts.packages = with pkgs; fonts.packages = with pkgs; [
[ material-design-icons
material-design-icons papirus-icon-theme
papirus-icon-theme (nerdfonts.override {fonts = ["ComicShannsMono"];}) # ComicShanns my beloved
(nerdfonts.override {fonts = ["ComicShannsMono"];}) # ComicShanns my beloved noto-fonts
noto-fonts noto-fonts-cjk-sans
noto-fonts-cjk-sans noto-fonts-cjk-serif
noto-fonts-cjk-serif noto-fonts-color-emoji
noto-fonts-color-emoji corefonts
corefonts ];
] # ++ optional (extraFonts != null) extraFonts;
++ optional (extraFonts != null) extraFonts;
# this fixes emoji stuff # this fixes emoji stuff
home-manager.users.${username} = { home-manager.users.${username} = {
fontconfig = { fonts.fontconfig = {
defaultFonts = { defaultFonts = {
monospace = ["ComicShannsMono Nerd Font" "Noto Color Emoji"]; monospace = ["ComicShannsMono Nerd Font" "Noto Color Emoji"];
sansSerif = ["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; package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark-BL"; name = "Gruvbox-Dark-BL";
}; };
cfg = config.modules.style.qt; cfg = config.modules.usrEnv.style.qt;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -38,7 +38,6 @@ in {
qt6Packages.qtstyleplugin-kvantum qt6Packages.qtstyleplugin-kvantum
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct libsForQt5.qt5ct
breeze-icons
]; ];
sessionVariables = { sessionVariables = {

View file

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

View file

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