mirror of
https://github.com/opdavies/build-configs.git
synced 2025-02-13 01:56:58 +00:00
feat(flakes): add direnv support
Generate an `.envrc` file to add support for Nix Flakes for projects that use them. I currently have `.direnv` directories ignored globally though this could be added to a `.gitignore` template when one is added. Refs: OD-43
This commit is contained in:
parent
1a70ba7c17
commit
8f48eea65f
|
@ -34,6 +34,7 @@ final class CreateListOfFilesToGenerate
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isFlake) {
|
if ($isFlake) {
|
||||||
|
$filesToGenerate->push(new TemplateFile(data: 'common/envrc', name: '.envrc'));
|
||||||
$filesToGenerate->push(new TemplateFile(data: 'common/flake.nix', name: 'flake.nix'));
|
$filesToGenerate->push(new TemplateFile(data: 'common/flake.nix', name: 'flake.nix'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
templates/common/envrc.twig
Normal file
3
templates/common/envrc.twig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# {{ managedText }}
|
||||||
|
|
||||||
|
use flake
|
Loading…
Reference in a new issue