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

Opt-in Mirror Mode #186

Open
dmadisetti opened this issue May 14, 2024 · 0 comments
Open

Opt-in Mirror Mode #186

dmadisetti opened this issue May 14, 2024 · 0 comments

Comments

@dmadisetti
Copy link

I'd like something less restrictive than explicit declaration, but still opt-in. Here's my idea

{
  environment.persistence."/persistent" = {
    hideMounts = true;
    ...

    users.talyz = {
         mirrored = true;
    };
  };
}

mirror mode sets a sticky group on directories- let's say the default is forgetful. The feature should also come with a helper script remember.

The remember script, moves the file/ folder to the persistent path, and changes the group to something not forgetful (default users), and mounts / symlinks.

On clean, all files with the forgetful group are pruned. Empty forgetful directories are pruned.
On boot, just mount everything declared mirror in the persistence equivalent path.

Let me know if this is a won't fix, and I'll just keep my implementation to myself.

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

No branches or pull requests

1 participant