lib/nixos: add filesystem-related functions

This commit is contained in:
Gabriel Arazas 2024-09-10 08:12:16 +08:00
parent 75e9dd5a45
commit af9d4521e2
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -54,4 +54,16 @@
start' = start + 1;
in
{ from = start'; to = start' + range; };
/*
A specific function that checks if specific filesystem setups are set.
*/
isFilesystemSet = config: setupName:
config.suites.filesystem.setups.${setupName}.enable or false;
/*
Get the path from the state variable.
*/
getFilesystem = config: setupName:
config.state.paths.${setupName};
}