# {{{autogen}}} { lib, config, pkgs, flakeRoot, stylix, ... }: let username = config.defaultUser or "henrov"; moduleName = "stylix"; assetPath = "${flakeRoot}/generated/.config/${moduleName}"; stylixConfFile = "${assetPath}/stylix.conf"; stylixConf = if builtins.pathExists stylixConfFile then builtins.readFile stylixConfFile else ""; cursorName = "phinger-cursors-light"; cursorSize = 24; in { ################################# # Enable Stylix module ################################# imports = [ stylix.nixosModules.stylix ]; ################################# # System packages ################################# environment.systemPackages = [ pkgs.feh pkgs.st ]; ################################# # Stylix system config ################################# stylix = { enable = true; base16Scheme = "${flakeRoot}/assets/traveldroid/theming/stylix/catppuccin-mocha.yaml"; polarity = "dark"; targets = { gtk.enable = true; qt.enable = true; }; cursor = { name = cursorName; package = pkgs.phinger-cursors; size = cursorSize; }; }; ################################# # Home Manager ################################# home-manager.users = { "${username}" = { ################################# # ONLY custom file (safe) ################################# home.file.".config/stylix/stylix.conf" = { text = stylixConf; force = true; }; ################################# # Environment variables ################################# home.sessionVariables = { STYLIX_CONF = "$HOME/.config/stylix/stylix.conf"; XCURSOR_THEME = cursorName; XCURSOR_SIZE = toString cursorSize; HYPRCURSOR_THEME = cursorName; HYPRCURSOR_SIZE = toString cursorSize; }; }; }; }