File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 ...
66} :
77let
8- inherit ( self . lib . file ) parseSystemConfigurations filterNixOSSystems filterDarwinSystems ;
8+ inherit ( self . lib . file )
9+ filterDarwinSystems
10+ filterNixOSSystems
11+ parseHomeConfigurations
12+ parseSystemConfigurations
13+ ;
914
1015 systemsPath = ../systems ;
16+ homesPath = ../homes ;
1117 allSystems = parseSystemConfigurations systemsPath ;
18+ allHomes = parseHomeConfigurations homesPath ;
19+ matchingHomes =
20+ system : hostname :
21+ lib . filterAttrs (
22+ _name : homeConfig : homeConfig . system == system && homeConfig . hostname == hostname
23+ ) allHomes ;
1224in
1325{
1426 flake = {
2032 value = self . lib . system . mkSystem {
2133 inherit inputs system hostname ;
2234 username = "khaneliman" ;
35+ matchingHomes = matchingHomes system hostname ;
2336 } ;
2437 }
2538 ) ( filterNixOSSystems allSystems ) ;
3245 value = self . lib . system . mkDarwin {
3346 inherit inputs system hostname ;
3447 username = "khaneliman" ;
48+ matchingHomes = matchingHomes system hostname ;
3549 } ;
3650 }
3751 ) ( filterDarwinSystems allSystems ) ;
Original file line number Diff line number Diff line change 2424 system ,
2525 hostname ,
2626 username ? "khaneliman" ,
27+ matchingHomes ? null ,
2728 modules ? [ ] ,
2829 ...
2930} :
3536 inputPackageSets = common . mkInputPackageSets {
3637 inherit flake system ;
3738 } ;
38- matchingHomes = common . mkHomeConfigs {
39- inherit
40- flake
41- system
42- hostname
43- ;
44- } ;
39+ resolvedMatchingHomes =
40+ if matchingHomes == null then
41+ common . mkHomeConfigs {
42+ inherit
43+ flake
44+ system
45+ hostname
46+ ;
47+ }
48+ else
49+ matchingHomes ;
4550 homeManagerConfig = common . mkHomeManagerConfig {
4651 inherit
4752 extendedLib
4853 inputs
4954 system
5055 hostname
51- matchingHomes
5256 inputPackageSets
5357 ;
58+ matchingHomes = resolvedMatchingHomes ;
5459 isNixOS = false ;
5560 } ;
5661in
Original file line number Diff line number Diff line change 2424 system ,
2525 hostname ,
2626 username ? "khaneliman" ,
27+ matchingHomes ? null ,
2728 modules ? [ ] ,
2829 ...
2930} :
3536 inputPackageSets = common . mkInputPackageSets {
3637 inherit flake system ;
3738 } ;
38- matchingHomes = common . mkHomeConfigs {
39- inherit
40- flake
41- system
42- hostname
43- ;
44- } ;
39+ resolvedMatchingHomes =
40+ if matchingHomes == null then
41+ common . mkHomeConfigs {
42+ inherit
43+ flake
44+ system
45+ hostname
46+ ;
47+ }
48+ else
49+ matchingHomes ;
4550 homeManagerConfig = common . mkHomeManagerConfig {
4651 inherit
4752 extendedLib
4853 inputs
4954 system
5055 hostname
51- matchingHomes
5256 inputPackageSets
5357 ;
58+ matchingHomes = resolvedMatchingHomes ;
5459 isNixOS = true ;
5560 } ;
5661in
You can’t perform that action at this time.
0 commit comments