Skip to content

Commit 3da76b6

Browse files
authored
stylix/mk-target: remove redundant unconditionalConfig argument (#2137)
Link: #2137 Reviewed-by: 0xda157 <[email protected]>
2 parents 5b5f21c + 75e660b commit 3da76b6

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

stylix/mk-target.nix

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@
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
@@ -125,11 +120,6 @@
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
@@ -143,12 +133,6 @@
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
#
@@ -182,7 +166,6 @@ in
182166
imports ? [ ],
183167
name ? name',
184168
options ? [ ],
185-
unconditionalConfig ? { },
186169
}@args:
187170
let
188171
mkTargetConfig = config;
@@ -341,10 +324,7 @@ let
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
};
350330
in

0 commit comments

Comments
 (0)