diff --git a/Droidnix/README.org b/Droidnix/README.org index 2a4f08a12..4fd28a108 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -700,7 +700,7 @@ in ** =generated/modules/traveldroid/desktop/stylix.nix= #+BEGIN_SRC nix :tangle generated/modules/traveldroid/desktop/stylix.nix :noweb tangle :mkdirp yes :eval never-html -{ lib, config, pkgs, flakeRoot, ... }: +{ lib, config, pkgs, flakeRoot, stylix, ... }: let username = config.defaultUser or "henrov"; @@ -712,7 +712,7 @@ let # Read all files in the asset directory assetFiles = builtins.attrNames (builtins.readDir assetPath); - # Convert files to Home Manager xdg config entries + # Convert files to Home Manager entries (same pattern as hyprland) stylixFiles = lib.genAttrs assetFiles (f: { name = ".config/${moduleName}/${f}"; value = { source = "${assetPath}/${f}"; }; @@ -725,32 +725,56 @@ let then builtins.readFile stylixConfFile else ""; - # Cursor defaults cursorName = "phinger-cursors-light"; cursorSize = 24; in { - ############################ + ################################# + # IMPORTANT: Enable Stylix module + ################################# + imports = [ + stylix.nixosModules.stylix + ]; + + ################################# # System packages - ############################ + ################################# environment.systemPackages = [ pkgs.feh pkgs.st ]; - ############################ - # Home Manager user-level configuration - ############################ + ################################# + # Stylix system configuration + ################################# + stylix = { + enable = true; + + base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml"; + polarity = "dark"; + + targets = { + gtk.enable = true; + qt.enable = true; # optional but recommended + }; + + cursor = { + name = cursorName; + size = cursorSize; + }; + }; + + ################################# + # Home Manager user-level config + ################################# _module.args.hmUsers = { "${username}" = { - # Merge all Stylix files + optional stylix.conf home.file = lib.mkMerge ( stylixFiles // { "${moduleName}/stylix.conf".text = stylixConf; } ); - # Session variables for Stylix & cursors home.sessionVariables = { STYLIX_CONF = "$HOME/.config/stylix/stylix.conf"; XCURSOR_THEME = cursorName; diff --git a/Droidnix/generated/modules/traveldroid/desktop/stylix.nix b/Droidnix/generated/modules/traveldroid/desktop/stylix.nix index 1922eccfa..73d46cceb 100644 --- a/Droidnix/generated/modules/traveldroid/desktop/stylix.nix +++ b/Droidnix/generated/modules/traveldroid/desktop/stylix.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, flakeRoot, ... }: +{ lib, config, pkgs, flakeRoot, stylix, ... }: let username = config.defaultUser or "henrov"; @@ -10,7 +10,7 @@ let # Read all files in the asset directory assetFiles = builtins.attrNames (builtins.readDir assetPath); - # Convert files to Home Manager xdg config entries + # Convert files to Home Manager entries (same pattern as hyprland) stylixFiles = lib.genAttrs assetFiles (f: { name = ".config/${moduleName}/${f}"; value = { source = "${assetPath}/${f}"; }; @@ -23,32 +23,56 @@ let then builtins.readFile stylixConfFile else ""; - # Cursor defaults cursorName = "phinger-cursors-light"; cursorSize = 24; in { - ############################ + ################################# + # IMPORTANT: Enable Stylix module + ################################# + imports = [ + stylix.nixosModules.stylix + ]; + + ################################# # System packages - ############################ + ################################# environment.systemPackages = [ pkgs.feh pkgs.st ]; - ############################ - # Home Manager user-level configuration - ############################ + ################################# + # Stylix system configuration + ################################# + stylix = { + enable = true; + + base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml"; + polarity = "dark"; + + targets = { + gtk.enable = true; + qt.enable = true; # optional but recommended + }; + + cursor = { + name = cursorName; + size = cursorSize; + }; + }; + + ################################# + # Home Manager user-level config + ################################# _module.args.hmUsers = { "${username}" = { - # Merge all Stylix files + optional stylix.conf home.file = lib.mkMerge ( stylixFiles // { "${moduleName}/stylix.conf".text = stylixConf; } ); - # Session variables for Stylix & cursors home.sessionVariables = { STYLIX_CONF = "$HOME/.config/stylix/stylix.conf"; XCURSOR_THEME = cursorName;