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

Migrate to linker #10

Open
Gerg-L opened this issue Jan 21, 2025 · 4 comments
Open

Migrate to linker #10

Gerg-L opened this issue Jan 21, 2025 · 4 comments
Labels
enhancement New feature or request premium issue for premium problems

Comments

@Gerg-L
Copy link

Gerg-L commented Jan 21, 2025

I've created:
https://github.com/Gerg-L/linker

Which should be able to replace tmpfiles, and more

It should be able to handle file "activation" and "deactivation"

Currently the biggest parts missing is testing and documentation

It can:

  • Create symlinks, files, directories
  • Change permissions of created directories and files
  • Recursively symlink directories
  • Delete files
  • Backup or move conflicting files
    And then reverse everything on deactivation
@eclairevoyant
Copy link
Contributor

I have a speculative PR https://github.com/feel-co/hjem/pull/9/files

My intent was originally to put it under <system profile path>/hjem/manifest.json, so that we can derive an absolute path that is tied to the generation when needing to use some linker. (This can easily be done with system.extraSystemBuilderCmds.)

The API I have in mind is to basically provide the paths to the old (/run/current-system/hjem/manifest.json) and new (${config.system.build.toplevel}/hjem/manifest.json) manifests , and the linker program will diff those two JSON files and operate on those. Would that be possible with your design?

@Gerg-L
Copy link
Author

Gerg-L commented Jan 21, 2025

A diffing mechanism could be implemented, it would be fairly simple, it might also allow atomic symlink switching

@eclairevoyant eclairevoyant pinned this issue Jan 21, 2025
@eclairevoyant eclairevoyant added enhancement New feature or request premium issue for premium problems labels Jan 21, 2025
@atagen
Copy link

atagen commented Jan 22, 2025

are there still plans to support a drop-in custom linker? I have some work done on one with configurable partial mutability (although it's turning out quite slow as the problem is hard). I would want to be able to use that for certain files and then defer to tmpfiles/this project/some other linker if possible.

@eclairevoyant
Copy link
Contributor

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request premium issue for premium problems
Projects
None yet
Development

No branches or pull requests

3 participants