-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
arrpc: 3.4.0 -> 3.5.0; add systemd user service #351774
Conversation
pkgs/by-name/ar/arrpc/package.nix
Outdated
substitute ${./arrpc.service} $out/share/systemd/user/arrpc.service \ | ||
--subst-var-by arrpc $out/bin/arrpc |
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.
I'm not sure if this is standard practice, would be the first time I see this in nixpkgs.
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.
I think it is standard. Packages like thunar
and syncthing
all installs a service file there. Example:
nixpkgs/pkgs/desktops/xfce/core/thunar/wrapper.nix
Lines 22 to 31 in c08e797
# point to wrapped binary in all service files | |
for file in "lib/systemd/user/thunar.service" \ | |
"share/dbus-1/services/org.xfce.FileManager.service" \ | |
"share/dbus-1/services/org.xfce.Thunar.FileManager1.service" \ | |
"share/dbus-1/services/org.xfce.Thunar.service" | |
do | |
rm -f "$out/$file" | |
substitute "${thunar}/$file" "$out/$file" \ | |
--replace "${thunar}" "$out" | |
done |
It will be picked up by system if config.systemd.packages
includes the package. My concern is whether it should be a system unit or a user unit.
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.
The example you've provided is for vendoring a service provided by upstream - not for shipping our own, though I can't exactly see an issue with it...
I am in favor of having it as an user service, since that's already what the home-manager module does
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.
Alright it seems that I am wrong. I need to define a nixos module for that.
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.
https://discourse.nixos.org/t/how-to-enable-upstream-systemd-user-services-declaratively/7649
Honestly I still don't quite understand how systemd user services provided by packages work in NixOS. There are some discussions.
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.
Please separate formatting and package change commits.
2fc6488
to
6fec8b8
Compare
@NotAShelf @Anomalocaridid It seems that running |
I've been running arrpc for a while now, with relative success (if you don't count the CPU spike after a few hours) Is this bug exclusive to 3.5.0? Or does it exist on older versions as well? |
It exists on 3.4.0, too. It only happened after I upgraded my NixOS 24.05 channel on Oct 24. Could you please try the master branch of nixpkgs? |
On my laptop, cloning the arrpc repo main branch and run |
Okay, built from master and started it in the background. I'll leave it running for a while. |
after 10 minutes of runtime, killed with |
That's strange. Could you try my branch in the PR? |
This is getting increasingly strange. If I use an older generation built before I updated on Oct 24, the bug doesn't appear, even if I run the exact same |
Also works from your branch. |
5f381ea
to
2add37d
Compare
Could you share your
This Linux kernel shouldn't matter because I tried both 6.1 and 6.6 (I cannot try newer kernels because nvidia-x11 fails to build). If you are also using the nixos-24.05 channel, could you try upgrading it? Sorry for bothering. |
Mine is similar to yours, though I'm running
I believe we have already established that your branch does build and run fine, as well as current master. This is likely an issue on your end. |
After bisecting, I found that f142a76 (linux_6_6: 6.6.56 -> 6.6.57) (if I use kernel 6.6) or 0dffe83 (linux_6_1: 6.1.112 -> 6.1.113) (if I use kernel 6.1) is the problematic commit. @NotAShelf Could you please tell me your kernel version? |
Currently 6.12-rc5, I was running 6.11.5 at the time of my previous tests. |
Sadly I cannot use kernel 6.11 because nvidia-x11 fails to build. Opened OpenAsar/arrpc#120. |
2add37d
to
a611045
Compare
Using tagged releases as OpenAsar/arrpc#48 is resolved now.
Added a systemd user service.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.