Add function to generate machine option lists + use it for services.
This commit is contained in:
parent
e6efbd736d
commit
13a25fe675
2 changed files with 12 additions and 6 deletions
7
fn.nix
7
fn.nix
|
@ -69,4 +69,11 @@ rec {
|
|||
true)
|
||||
))
|
||||
ld);
|
||||
makeOptionTypeList = path: (lists.forEach
|
||||
# get a list of all files ending in .nix in path
|
||||
(filter (filePath: hasSuffix ".nix" filePath)
|
||||
(lsfRec path true))
|
||||
# remove leading path and trailing ".nix", replace every slash with "::"
|
||||
(replaceStrings [ "${path}/" "/" ".nix" ] [ "" "::" "" ])
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue