mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 00:18:59 +00:00
lib/nixos: add filesystem-related functions
This commit is contained in:
parent
75e9dd5a45
commit
af9d4521e2
@ -54,4 +54,16 @@
|
|||||||
start' = start + 1;
|
start' = start + 1;
|
||||||
in
|
in
|
||||||
{ from = start'; to = start' + range; };
|
{ 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