-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
Conversation
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ cfg.package ]; | ||
launchd.user.agents.lorri = { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
launchd.user.agents.lorri = { | |
launchd.user.agents.lorri = { | |
path = with pkgs; [ nix gitMinimal gnutar gzip ]; |
Thanks for the clarification @LnL7 |
Just to throw a spanner in the works, there are a few other examples to use for reference/inspiration:
|
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 It may be better to run lorri as system agent to get around this issue. |
@jamesottaway mkdir example
lorri init
# add pkgs.cowsay to shell.nix
cd ..
cd example
cowsay
# Unknown command cowsay Does that work on your machine? |
@tricktron no, looks like I'm in need of some more tinkering. thanks for the heads up. |
@LnL7 @zachcoyle @jamesottaway I made it working and opened another pull request #222. |
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