{ lib, config, pkgs, flakeRoot, stylix, ... }: let username = config.defaultUser or "henrov"; moduleName = "stylix"; assetPath = "${flakeRoot}/assets/traveldroid/conf/${moduleName}"; assetFiles = builtins.attrNames (builtins.readDir assetPath); # Same pattern as hyprland.nix (IMPORTANT) stylixFiles = lib.genAttrs assetFiles (f: { name = ".config/${moduleName}/${f}"; value = { source = "${assetPath}/${f}"; }; }); 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; }; # Define FULL cursor set OR remove entirely cursor = { name = cursorName; package = pkgs.phinger-cursors; size = cursorSize; }; }; ################################# # Home Manager ################################# _module.args.hmUsers = { "${username}" = { home.file = lib.mkMerge [ stylixFiles { ".config/${moduleName}/stylix.conf".text = stylixConf; } ]; home.sessionVariables = { STYLIX_CONF = "$HOME/.config/stylix/stylix.conf"; XCURSOR_THEME = cursorName; XCURSOR_SIZE = toString cursorSize; HYPRCURSOR_THEME = cursorName; HYPRCURSOR_SIZE = toString cursorSize; }; gtk.theme.name = lib.mkForce "Catppuccin-Mocha-Standard-Blue-Dark"; }; }; }