File tree Expand file tree Collapse file tree 1 file changed +2
-22
lines changed
Expand file tree Collapse file tree 1 file changed +2
-22
lines changed Original file line number Diff line number Diff line change 1717 follows:
1818
1919 ```nix
20- { mkTarget, lib... }:
20+ { mkTarget, lib, ... }:
2121 mkTarget {
22- unconditionalConfig =
23- lib.mkIf complexCondition {
24- home.packages = [ pkgs.hello ];
25- };
26-
2722 config = [
2823 { programs.«name».theme.name = "stylix"; }
2924
125120 : The target name used to generate options in the `stylix.targets.${name}`
126121 namespace.
127122
128- `unconditionalConfig` (Attribute set or function or path)
129- : This argument mirrors the `config` argument but intentionally lacks
130- automatic safeguarding and should only be used for complex configurations
131- where `config` is unsuitable.
132-
133123 # Environment
134124
135125 The function is provided alongside module arguments in any modules imported
143133# of modules:
144134#
145135# {
146- # unconditionalConfig =
147- # { lib, pkgs }:
148- # lib.mkIf complexCondition {
149- # home.packages = [ pkgs.hello ];
150- # };
151- #
152136# config = [
153137# { programs.example.theme.name = "stylix"; }
154138#
182166 imports ? [ ] ,
183167 name ? name' ,
184168 options ? [ ] ,
185- unconditionalConfig ? { } ,
186169} @args :
187170let
188171 mkTargetConfig = config ;
341324 config . lib . stylix . mkEnableTargetWith enableArgs ;
342325
343326 config = lib . mkIf ( config . stylix . enable && cfg . enable ) (
344- lib . mkMerge (
345- lib . singleton ( callModule false unconditionalConfig )
346- ++ map ( callModule true ) normalizedConfig
347- )
327+ lib . mkMerge ( map ( callModule true ) normalizedConfig )
348328 ) ;
349329 } ;
350330in
You can’t perform that action at this time.
0 commit comments