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

Feature request: Darwin/Standalone support. #4

Open
Isolaryn opened this issue Dec 22, 2024 · 4 comments
Open

Feature request: Darwin/Standalone support. #4

Isolaryn opened this issue Dec 22, 2024 · 4 comments
Labels
question Further information is requested

Comments

@Isolaryn
Copy link

I love the overall simplicity however due to work requirements (Macbooks :( ) I would like to explore what would be needed for nix-darwin/ standalone implementations without adding too much complexity.

@NotAShelf
Copy link
Contributor

@eclairevoyant and I have agreed that standalone support is not a priority, perhaps not even a goal of this project. Darwin support could be feasible, but in its current state Hjem depends on the Nixpkgs module system for users.users and systemd.user.tmpfiles.users, thus nix-darwin support is not possible for the time being.

If we could somehow get rid of the dependency to nixpkgs module system (which is currently used for deriving the directory for a Hjem managed home and asserting users' existence) then both of those goals could be achievable - I would like to get rid of the hard-dependency on systemd-tmpfiles in the near future, by implementing "hooks" that Hjem may call on activation to allow changing the methods used to link files in place.

@NotAShelf NotAShelf added the question Further information is requested label Dec 22, 2024
@Isolaryn
Copy link
Author

Isolaryn commented Dec 23, 2024

I don't care about standalone either but wanted to include it anyway. I think it would be the easiest (If you only care about systemd machines) as I believe you can just write the rules to ~/.config/user-tmpfiles.d/hjem.conf and run systemd-tmpfiles --user --create --remove ~/.config/user-tmpfiles.d/hjem.conf (I would have to double check this).
This does leave out Darwin standalone but I am not sure that even matters.

Darwin relies on larger activation scripts so there would be more work to achieve this.

@NotAShelf
Copy link
Contributor

With #7 Hjem will no longer depend on the nixpkgs module options for trivial assertions. I've refactored most of the platform-independent code into a common module, which can be imported in future modules (such as a nix-darwin module.)

Though worth nothing that I currently have no Darwin machine to test with, so I will need to look into the potential implementation of a Darwin module when I do have one.

@eclairevoyant
Copy link
Member

#10 can be considered a prerequisite for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants