File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "admin" : {
3+ "username" : " admin" ,
4+ "initialHashedPassword" : " $y$j9T$sXZCGwjtugZIt/C2nU8bk/$D36OrIe3eyGSM7rPysbQI1OyT56TdtJZtcvnOne2Ge0"
5+ },
6+ "justinhoang" : {
7+ "username" : " justinhoang" ,
8+ "email" : " j124.dev@proton.me" ,
9+ "initialHashedPassword" : " $y$j9T$sXZCGwjtugZIt/C2nU8bk/$D36OrIe3eyGSM7rPysbQI1OyT56TdtJZtcvnOne2Ge0"
10+ }
11+ }
Original file line number Diff line number Diff line change 202202 } ;
203203 } ;
204204
205- # Define the users
206- # NOTE: maybe move this to a json file in the future
207- justinhoang = {
208- username = "justinhoang" ;
209- email = "j124.dev@proton.me" ;
210- initialHashedPassword = "$y$j9T$sXZCGwjtugZIt/C2nU8bk/$D36OrIe3eyGSM7rPysbQI1OyT56TdtJZtcvnOne2Ge0" ;
211- } ;
205+ # Read the users from a file
206+ users = builtins . fromJSON ( builtins . readFile ./data/users.json ) ;
212207 in
213208 {
214209 inherit lib ;
238233 {
239234 name = "lab" ;
240235 system = "x86_64-linux" ;
241- userConfigs = [ justinhoang ] ;
236+ userConfigs = [ users . justinhoang ] ;
242237 }
243238 {
244239 name = "legion" ;
245240 system = "x86_64-linux" ;
246- userConfigs = [ justinhoang ] ;
241+ userConfigs = [ users . justinhoang ] ;
247242 }
248243 {
249244 name = "penguin" ;
250245 system = "x86_64-linux" ;
251- userConfigs = [ justinhoang ] ;
246+ userConfigs = [ users . justinhoang ] ;
252247 }
253248 {
254249 name = "pi" ;
255250 system = "aarch64-linux" ;
256- userConfigs = [ justinhoang ] ;
251+ userConfigs = [ users . admin ] ;
257252 enableHomeManager = false ;
258253 }
259254 ]
263258 {
264259 name = "mbp3" ;
265260 system = "aarch64-darwin" ;
266- userConfigs = [ justinhoang ] ;
261+ userConfigs = [ users . justinhoang ] ;
267262 }
268263 ]
269264 ) ;
272267 {
273268 name = "wsl" ;
274269 system = "x86_64-linux" ;
275- userConfig = justinhoang ;
270+ userConfig = users . justinhoang ;
276271 }
277272 ]
278273 ) ;
You can’t perform that action at this time.
0 commit comments