mirror of
https://github.com/RGBCube/HTMNIX
synced 2025-07-29 00:47:44 +00:00
Use getEnv to evaulate any file
This commit is contained in:
parent
730e3eb8f0
commit
5e91f5fa6f
4 changed files with 45 additions and 1 deletions
|
@ -74,6 +74,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
result = builtins.scopedImport { inherit (self) raw __findFile; } ./html.nix;
|
||||
result = let
|
||||
targetFile = builtins.getEnv "TARGET_FILE";
|
||||
targetFile' = if targetFile != "" then targetFile else "site/index.nix";
|
||||
in builtins.scopedImport { inherit (self) raw __findFile; } ./${targetFile'};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue