File tree Expand file tree Collapse file tree 1 file changed +18
-12
lines changed
Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -224,18 +224,24 @@ let
224224 modules = [
225225 perSystemModule
226226 modulePath
227- {
228- home . username = lib . mkDefault username ;
229- # Home Manager would use builtins.getEnv prior to 20.09, but
230- # this feature was removed to make it pure. However, since
231- # we know the operating system and username ahead of time,
232- # it's safe enough to automatically set a default for the home
233- # directory and let users customize it if they want. This is
234- # done automatically in the NixOS or nix-darwin modules too.
235- home . homeDirectory = lib . mkDefault (
236- if pkgs . stdenv . isDarwin then "/Users/${ username } " else "/home/${ username } "
237- ) ;
238- }
227+ (
228+ { config , ... } :
229+ {
230+ home . username = lib . mkDefault username ;
231+ # Home Manager would use builtins.getEnv prior to 20.09, but
232+ # this feature was removed to make it pure. However, since
233+ # we know the operating system and username ahead of time,
234+ # it's safe enough to automatically set a default for the home
235+ # directory and let users customize it if they want. This is
236+ # done automatically in the NixOS or nix-darwin modules too.
237+ home . homeDirectory =
238+ let
239+ username = config . home . username ;
240+ homeDir = if pkgs . stdenv . isDarwin then "/Users/${ username } " else "/home/${ username } " ;
241+ in
242+ lib . mkDefault homeDir ;
243+ }
244+ )
239245 ] ;
240246 } ;
241247
You can’t perform that action at this time.
0 commit comments