mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
lib/nixos: add filesystem-related functions
This commit is contained in:
parent
75e9dd5a45
commit
af9d4521e2
@ -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};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user