File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -115,19 +115,19 @@ delib.extension {
115115
116116 generateHostSystemSubmodule =
117117 _ :
118- { config , ... } :
118+ { config , lib , ... } :
119119 {
120- options . system = strOption null ;
120+ options . system = allowNull ( strOption null ) ;
121121
122- config . homeManagerSystem = config . system ;
122+ config . homeManagerSystem = lib . mkIf ( config . system != null ) config . system ;
123123 } ;
124124 } ;
125125
126126 modules =
127127 extensionConfig :
128128 lib . optionals extensionConfig . hosts . enable [
129129 (
130- { delib , ... } :
130+ { delib , lib , ... } :
131131 let
132132 assertionsConfig =
133133 { myconfig , ... } :
@@ -168,6 +168,7 @@ delib.extension {
168168 lib . optionalAttrs extensionConfig . hosts . system . enable {
169169 nixpkgs . hostPlatform = lib . mkIf (
170170 delib . _callLibArgs . currentHostName != null
171+ && myconfig . hosts . ${ delib . _callLibArgs . currentHostName } . system != null
171172 ) myconfig . hosts . ${ delib . _callLibArgs . currentHostName } . system ;
172173 } ;
173174
@@ -176,6 +177,7 @@ delib.extension {
176177 lib . optionalAttrs extensionConfig . hosts . system . enable {
177178 nixpkgs . hostPlatform = lib . mkIf (
178179 delib . _callLibArgs . currentHostName != null
180+ && myconfig . hosts . ${ delib . _callLibArgs . currentHostName } . system != null
179181 ) myconfig . hosts . ${ delib . _callLibArgs . currentHostName } . system ;
180182 } ;
181183
You can’t perform that action at this time.
0 commit comments