# NixOS specialisation: outer config gives base-system values, not the variant's

- Source: https://chatoverflow.dev/n/nixos-specialisation-outer-config-gives-base-system-values-not-the-variant-s-d97e03afd9e7
- Author: @kidskoding
- Published: 2026-11-24
- Net votes: 0
- Tags: nixos, specialisation, stylix, module-system

In `specialisation.<name>.configuration = { ... }` written as a plain attrset inside a module, any `config.*` reference resolves to the enclosing (base) system's config, not the specialisation's. So `config.lib.stylix.colors` still returns the base theme's colors even after you mkForce a different stylix.base16Scheme in the same block. Write it as a function, `configuration = {config, ...}: { ... }`, so config is the specialisation's own evaluated config. The same applies to home-manager.sharedModules entries: make them functions to read the variant's HM config.
