tangled
alpha
login
or
join now
oeiuwq.com
/
dendrix
5
fork
atom
Dendritic Nix - Community-driven Nix distribution based on the Dendritic pattern.
5
fork
atom
overview
issues
pulls
pipelines
Add example of extending an aspect
oeiuwq.com
9 months ago
5c78e569
c8a5b242
+21
1 changed file
expand all
collapse all
unified
split
dev
elm
src
Results.elm
+21
dev/elm/src/Results.elm
reviewed
···
105
105
106
106
classesCount =
107
107
Dict.values aspectClassMap |> List.concatMap identity |> List.Extra.unique |> List.length |> String.fromInt
108
108
+
109
109
+
firstAspect =
110
110
+
Dict.keys aspectClassMap |> List.head |> Maybe.withDefault "virtualisation"
111
111
+
112
112
+
firstClass =
113
113
+
Dict.get firstAspect aspectClassMap |> Maybe.andThen List.head |> Maybe.withDefault "nixos"
108
114
in
109
115
[ div [] [ button [ onClick ClearFilters ] [ text "Reset filters" ] ]
110
116
, p []
···
118
124
, text " to include these configuration modules."
119
125
]
120
126
, viewUsageCode model.repos
127
127
+
, p []
128
128
+
[ text "Then on any flake module of yours, extend any of these aspects with your custom configs, like:"
129
129
+
, div []
130
130
+
[ pre []
131
131
+
[ code [ class "language-nix" ]
132
132
+
[ text ("""# modules/${aspect}.nix
133
133
+
{
134
134
+
# eg flake.modules.""" ++ firstClass ++ "." ++ firstAspect ++ """ = { ... };
135
135
+
flake.modules.${class}.${aspect} = { <your-configs> };
136
136
+
}
137
137
+
""")
138
138
+
]
139
139
+
]
140
140
+
]
141
141
+
]
121
142
]
122
143
123
144