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

home-manager: Add allowOther option to let other users read bind mounts #39

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

talyz
Copy link
Collaborator

@talyz talyz commented Jan 24, 2021

NixOS defaults to not letting fuse mounts be allowed to let other users read their contents. bindfs wants to give other users access and is therefore normally run with --no-allow-other to not throw an error.

Giving other users, mainly root, access to the bind mounts is, however, useful and works fine when

{
  programs.fuse.userAllowOther = true;
}

is declared in configuration.nix. This adds an option to choose whether to give other users access or not. It also prompts the user to set the allowOther attribute with a link to the documentation.

Should be merged after #38.

Fixes #35

@talyz talyz mentioned this pull request Jan 24, 2021
example = true;
apply = x:
if x == null then
warn ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to display this warning? Why not just default to false?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly necessary, no. It's mainly that I think most people would want to set it to true, but probably don't know it. Essentially, we can't set it to the sane default, since it clashes with the default NixOS configuration.

…unts

NixOS defaults to not letting fuse mounts be allowed to let other
users read their contents. `bindfs` wants to give other users access
and is therefore normally run with `--no-allow-other` to not throw an
error.

Giving other users, mainly `root`, access to the bind mounts is,
however, useful and works fine when

programs.fuse.userAllowOther = true;

is declared in `configuration.nix`. This adds an option to choose
whether to give other users access or not. It also prompts the user to
set the `allowOther` attribute with a link to the documentation.
The checks should be unnecessary, since `mkdir -p` is idempotent.
This is purely for convenience when fiddling with the services
manually, since the directory is created by the activation script
already.
@talyz talyz merged commit 5855884 into master Jan 29, 2021
@lovesegfault lovesegfault deleted the bindfs-allow-other branch January 29, 2021 19:13
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.

Does not work with Docker
3 participants