aboutsummaryrefslogtreecommitdiff
path: root/modules/homeModules/stylix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/homeModules/stylix.nix')
-rw-r--r--modules/homeModules/stylix.nix80
1 files changed, 80 insertions, 0 deletions
diff --git a/modules/homeModules/stylix.nix b/modules/homeModules/stylix.nix
new file mode 100644
index 0000000..1a28fe9
--- /dev/null
+++ b/modules/homeModules/stylix.nix
@@ -0,0 +1,80 @@
+{inputs, ...}: {
+ flake.homeModules.stylixConfig = {
+ pkgs,
+ config,
+ lib,
+ inputs,
+ ...
+ }: {
+ imports = [
+ inputs.stylix.homeModules.stylix
+ ];
+
+ options.customs = {
+ stylixConfig = {
+ enable = lib.mkEnableOption "enable stylix";
+ theme = lib.mkOption {type = lib.types.str;};
+ };
+ wallpaper = lib.mkOption {type = with lib.types; oneOf [str path package];};
+ };
+ config = lib.mkIf config.customs.stylixConfig.enable {
+ wallpaper = with config.lib.stylix.colors.withHashtag;
+ pkgs.runCommand "cat.png" {} ''
+ pastel=${pkgs.pastel}/bin/pastel
+ SHADOWS=$($pastel darken 0.1 '${base05}' | $pastel format hex)
+ TAIL=$($pastel lighten 0.1 '${base02}' | $pastel format hex)
+ HIGHLIGHTS=$($pastel lighten 0.1 '${base05}' | $pastel format hex)
+
+ ${pkgs.imagemagick}/bin/convert ${./attachments/basecat.png} \
+ -fill '${base00}' -opaque black \
+ -fill '${base05}' -opaque white \
+ -fill '${base08}' -opaque blue \
+ -fill $SHADOWS -opaque gray \
+ -fill '${base02}' -opaque orange \
+ -fill $TAIL -opaque green \
+ -fill $HIGHLIGHTS -opaque brown \
+ $out'';
+ stylix = {
+ enable = true;
+ targets = {
+ rofi.enable = false;
+ waybar.enable = false;
+ firefox.profileNames = ["ShyFox"];
+ };
+
+ polarity = "dark";
+
+ base16Scheme = "${pkgs.base16-schemes}/share/themes/${config.customs.stylixConfig.theme}.yaml";
+ image = config.wallpaper;
+ cursor = {
+ package = pkgs.bibata-cursors;
+ name = "Bibata-Modern-Ice";
+ size = 24;
+ };
+
+ fonts = {
+ sizes.terminal = 11;
+ serif = {
+ package = pkgs.noto-fonts;
+ name = "Noto Serif";
+ };
+
+ sansSerif = {
+ package = pkgs.rubik;
+ name = "Rubik";
+ };
+
+ monospace = {
+ package = pkgs.nerd-fonts.fira-code;
+ name = "FiraCode Nerd Font";
+ };
+
+ emoji = {
+ package = pkgs.noto-fonts-color-emoji;
+ name = "Noto Color Emoji";
+ };
+ };
+ };
+ };
+ };
+}