Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files #1590

Merged
merged 4 commits into from
Nov 14, 2024
Merged

Files #1590

merged 4 commits into from
Nov 14, 2024

Conversation

bobvanderlinden
Copy link
Contributor

Follow-up on #142

This adds files, which allows creating (=linking) files into the devenv directory. This adds the following options:

files.<name>.ini
files.<name>.json
files.<name>.yaml
files.<name>.toml
files.<name>.text

Only one of these options may be set for each file.

name indicates the name/path of the file. For example:

files."some/file.txt".text = ''
  this is some file
'';

Will create a file $DEVENV_ROOT/some/file.txt.

The test tests/files/devenv.nix shows more basic examples of each supported format.

I'm on the fence whether the internal options are useful. The intention was to still be able to override the format ini that has different options, even though this isn't supported by the docs.

I did drop the support for files.<name>.executable, it didn't make much sense for most of the formats. It could've been for text, but then I'd rather see something like script that uses an interpreter option to be used in the shebang. That said, it's still possible to create such a script with the internal options.

@domenkozar domenkozar merged commit 87edaaf into cachix:main Nov 14, 2024
@domenkozar
Copy link
Member

Thank you 😍

@bobvanderlinden bobvanderlinden deleted the files branch November 15, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants