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

redshift: Install systemd user unit files #54480

Closed
wants to merge 1 commit into from

Conversation

@jabranham
Copy link
Contributor

@jabranham jabranham commented Jan 22, 2019

Motivation for this change

redshift's systemd user units currently aren't installed. This installs them.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jabranham jabranham force-pushed the redshift-systemd branch from c2aa0ab to 4297e58 Jan 22, 2019
@@ -44,7 +45,7 @@ stdenv.mkDerivation rec {
"--enable-drm=${if withDrm then "yes" else "no"}"
"--enable-quartz=${if withQuartz then "yes" else "no"}"
"--enable-corelocation=${if withCoreLocation then "yes" else "no"}"
];
] ++ stdenv.lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=\${out}/lib/systemd/user";
Copy link
Contributor

@worldofpeace worldofpeace Jan 22, 2019

Choose a reason for hiding this comment

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

Suggested change
] ++ stdenv.lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=\${out}/lib/systemd/user";
] ++ stdenv.lib.optional (stdenv.isLinux && useSystemd) "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user";

Copy link
Contributor

@worldofpeace worldofpeace left a comment

We might need to make changes to our nixos module to include these.
Additonally do these differ from the one we make at

systemd.user.services.redshift =

@worldofpeace
Copy link
Contributor

@worldofpeace worldofpeace commented Jan 22, 2019

Just checked and we can't use these service files since we pass extra flags to the ExecStart in the unit based on the users specifed configuration. So I don't think we'll care about these in NixOS.

But I guess for other Linux distributions we should still have them installed.

@jabranham
Copy link
Contributor Author

@jabranham jabranham commented Jan 23, 2019

Oh, I didn't know about the redshift options on NixOS. I usually use these at the user level because I have two accounts, one of which uses redshift and the other doesn't. There's currently no way to specify that in NixOS, though, as far as I can tell.

@jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Jan 23, 2019

We can just override the ExecStart field in the module.

@jabranham jabranham closed this Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants