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

nixos: Create persistent storage directories and their parents #193

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

talyz
Copy link
Collaborator

@talyz talyz commented Jun 23, 2024

If they're not filesystem roots, they won't exist when deploying to a new system and would otherwise have to be manually created.

Fix #154

cc @tmarkov

@tmarkov
Copy link

tmarkov commented Jun 23, 2024

I'll try to try this tomorrow. Out of curiosity, why isn't simply passing -p to mkdir good enough?

@talyz
Copy link
Collaborator Author

talyz commented Jun 23, 2024

It opens up for directories being created with the wrong permissions and ownership if they're created in the wrong order. You would always have to consider the possible side effects of it, basically. Explicitly creating all directories in the hierarchy gives much better control and makes potential issues easier to pinpoint.

@visualphoenix
Copy link

any reason why this removes quoting in the bash part?

@talyz talyz force-pushed the create-persistent-storage-dirs branch from 9b2f59d to 2f108f3 Compare June 24, 2024 09:26
@tmarkov
Copy link

tmarkov commented Jul 2, 2024

Sorry for the delay, had trouble setting up a test vm properly.

But everything seems to work fine (at least on my config).

If they're not filesystem roots, they won't exist when deploying to a
new system and would otherwise have to be manually created.
@talyz talyz force-pushed the create-persistent-storage-dirs branch from 2f108f3 to dff77f7 Compare October 16, 2024 07:45
@talyz talyz merged commit dff77f7 into master Oct 16, 2024
8 checks passed
@talyz talyz deleted the create-persistent-storage-dirs branch October 16, 2024 07:46
@talyz
Copy link
Collaborator Author

talyz commented Oct 16, 2024

any reason why this removes quoting in the bash part?

Only that quoting is unnecessary inside double square brackets, as string splitting is not performed in that context.

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.

Fails with mkdir: cannot create directory: No such file or directory
3 participants