-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
home-manager services have an issue on nixpkgs/staging-next (update 2022-04-05: now on the main branch) #2846
Comments
diff --git a/modules/systemd.nix b/modules/systemd.nix
index cd5b30ed..5af892ee 100644
--- a/modules/systemd.nix
+++ b/modules/systemd.nix
@@ -38,11 +38,14 @@ let
# Needed because systemd derives unit names from the ultimate
# link target.
- source = pkgs.writeTextFile {
- name = pathSafeName;
+ source = (pkgs.runCommand "unit-${pathSafeName}" {
+ preferLocalBuild = true;
+ allowSubstitutes = false;
text = toSystemdIni serviceCfg;
- destination = lib.escapeShellArg "/${filename}";
- } + "/${filename}";
+ } ''
+ mkdir -p $out
+ echo -n "$text" > $out/${lib.escapeShellArg filename}
+ '') + "/${filename}";
wantedBy = target: {
name = "systemd/user/${target}.wants/${filename}"; |
staging-next got merged to |
FYI, @yu-re-ka patch works like a charm, forgot to report back. |
Same issues at hm's release-21.11 + nixos-unstable. |
If everyone waits for someone else to do that we can wait a long time :p |
My take: https://github.com/nix-community/home-manager/pull/2867/files#issuecomment-1090345033 diff --git a/modules/systemd.nix b/modules/systemd.nix
index cd5b30ed..0be586d7 100644
--- a/modules/systemd.nix
+++ b/modules/systemd.nix
@@ -41,7 +41,7 @@ let
source = pkgs.writeTextFile {
name = pathSafeName;
text = toSystemdIni serviceCfg;
- destination = lib.escapeShellArg "/${filename}";
+ destination = "/${filename}";
} + "/${filename}";
wantedBy = target: { |
Is there an existing issue for this?
Issue description
Under staging-next (plus gcc_11 and binutils-2.38 as stdenv, plus some not yet upstreamed changes to some unrelated applications) home-manager emacs/gpg-agent services fail to build; think it might be related to the systemd version bump on staging-next (to v250) though currently building on top of staging-next.
Inverstigating the issue, will attempt to bisect the cause.
Maintainer CC
No response
System information
Though, as mentioned on staging-next + gcc_11 + binutils_2_38:
The text was updated successfully, but these errors were encountered: