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

module: add Lorri service #204

Closed
wants to merge 1 commit into from

Conversation

zachcoyle
Copy link
Contributor

I've added a service module to enable the Lorri daemon, adapted from the home-manager Lorri service.
It may still be missing something, as I'm not sure exactly what the following lines do:
https://github.com/rycee/home-manager/blob/8af92f844f6acb3957dd68072e8fc0e00d4c3eba/modules/services/lorri.nix#L41-L44

@zachcoyle zachcoyle changed the title Add Lorri service module: add Lorri service May 27, 2020

config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
launchd.user.agents.lorri = {
Copy link
Owner

Choose a reason for hiding this comment

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

From what I recall the lorri daemon runs evaluation, which means in order to evaluate expressions with builtins.fetchTarball or fetchGit it will need access to tar/git. There's a path option for launchd services which provides a convenient way to expose binaries.

Copy link
Contributor

Choose a reason for hiding this comment

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

So I guess you can just add this:

Suggested change
launchd.user.agents.lorri = {
launchd.user.agents.lorri = {
path = with pkgs; [ nix gitMinimal gnutar gzip ];

@zachcoyle
Copy link
Contributor Author

Thanks for the clarification @LnL7

@jamesottaway
Copy link
Contributor

jamesottaway commented May 31, 2020

adapted from the home-manager Lorri service

Just to throw a spanner in the works, there are a few other examples to use for reference/inspiration:

@surajbarkale
Copy link

I ran into permission issues with macOS 10.15.5 and lorri running as user agent. I am launching lorri via shell invocation so it gets the NIX_PATH correctly. I had to give "Full Disk Access" to my shell to make the daemon work with files in ~/Documents.

It may be better to run lorri as system agent to get around this issue.

@tricktron
Copy link
Contributor

@jamesottaway
Thanks for collecting all the different configs. Unfortunately your config doesn't work for me:
My test approach:

mkdir example
lorri init
# add pkgs.cowsay to shell.nix
cd ..
cd example
cowsay
# Unknown command cowsay

Does that work on your machine?

@jamesottaway
Copy link
Contributor

@tricktron no, looks like I'm in need of some more tinkering. thanks for the heads up.

@tricktron tricktron mentioned this pull request Aug 29, 2020
@tricktron
Copy link
Contributor

@LnL7 @zachcoyle @jamesottaway I made it working and opened another pull request #222.

@zachcoyle zachcoyle closed this Sep 4, 2020
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.

5 participants