2024-01-19 03:06:52 +05:30
|
|
|
{ lib, pkgs, stylix, userSettings, ... }:
|
2023-06-16 06:14:14 +05:30
|
|
|
|
2023-05-14 07:14:08 +05:30
|
|
|
let
|
2024-01-19 03:06:52 +05:30
|
|
|
themePath = "../../../themes/"+userSettings.theme+"/"+userSettings.theme+".yaml";
|
|
|
|
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
|
2023-06-23 01:23:10 +05:30
|
|
|
myLightDMTheme = if themePolarity == "light" then "Adwaita" else "Adwaita-dark";
|
2024-01-19 03:06:52 +05:30
|
|
|
backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/backgroundurl.txt");
|
|
|
|
backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+userSettings.theme)+"/backgroundsha256.txt");
|
2023-05-14 07:14:08 +05:30
|
|
|
in
|
|
|
|
{
|
2023-06-21 08:33:14 +05:30
|
|
|
imports = [ stylix.nixosModules.stylix ];
|
|
|
|
|
2023-06-16 06:14:14 +05:30
|
|
|
stylix.autoEnable = false;
|
2023-06-23 01:23:10 +05:30
|
|
|
stylix.polarity = themePolarity;
|
2023-06-16 06:14:14 +05:30
|
|
|
stylix.image = pkgs.fetchurl {
|
2023-06-23 01:23:10 +05:30
|
|
|
url = backgroundUrl;
|
|
|
|
sha256 = backgroundSha256;
|
2023-06-16 06:14:14 +05:30
|
|
|
};
|
2023-06-23 01:23:10 +05:30
|
|
|
stylix.base16Scheme = ./. + themePath;
|
2023-06-16 06:14:14 +05:30
|
|
|
stylix.fonts = {
|
|
|
|
monospace = {
|
2024-01-19 03:06:52 +05:30
|
|
|
name = userSettings.font;
|
|
|
|
package = userSettings.fontPkg;
|
2023-06-16 06:14:14 +05:30
|
|
|
};
|
|
|
|
serif = {
|
2024-01-19 03:06:52 +05:30
|
|
|
name = userSettings.font;
|
|
|
|
package = userSettings.fontPkg;
|
2023-06-16 06:14:14 +05:30
|
|
|
};
|
|
|
|
sansSerif = {
|
2024-01-19 03:06:52 +05:30
|
|
|
name = userSettings.font;
|
|
|
|
package = userSettings.fontPkg;
|
2023-06-16 06:14:14 +05:30
|
|
|
};
|
|
|
|
emoji = {
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
package = pkgs.noto-fonts-emoji-blob-bin;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
stylix.targets.lightdm.enable = true;
|
|
|
|
services.xserver.displayManager.lightdm = {
|
|
|
|
greeters.slick.enable = true;
|
|
|
|
greeters.slick.theme.name = myLightDMTheme;
|
|
|
|
};
|
|
|
|
stylix.targets.console.enable = true;
|
2023-05-14 07:14:08 +05:30
|
|
|
|
2023-10-01 09:07:18 +05:30
|
|
|
environment.sessionVariables = {
|
|
|
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
|
|
|
};
|
|
|
|
|
2023-05-14 07:14:08 +05:30
|
|
|
}
|