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
nixos/upower: Allow customization of UPower.conf #73968
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Br1ght0ne
requested changes
Nov 23, 2019
Br1ght0ne
approved these changes
Nov 23, 2019
matthewbauer
reviewed
Dec 2, 2019
worldofpeace
suggested changes
Dec 2, 2019
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.
See @matthewbauer and my comments.
A release note can be added at
The following new services were added since the last release:
mat8913
added a commit
to mat8913/nixpkgs
that referenced
this pull request
Dec 3, 2019
In the process of making UPower.conf customizable (NixOS#73968), it came up that UPower doesn't load its config from /etc by default. The UPower derivation is modified to make it load its config from /etc at runtime, but still install the default config to its nix store path as before. The UPower module is modified to symlink the default config into /etc.
10 tasks
worldofpeace
reviewed
Dec 3, 2019
Documentation of options and default values taken from the upstream UPower.conf. The documentation was modified slightly to make more sense when displayed on https://nixos.org/nixos/options.html. A copy of upstream UPower.conf can be found here: https://cgit.freedesktop.org/upower/tree/etc/UPower.conf?id=28bd86c181e2510ef6a1dc7cfa26f97803698a79
In the process of making UPower.conf customizable (NixOS#73968), it came up that UPower doesn't load its config from /etc by default. The UPower derivation is modified to make it load its config from /etc at runtime, but still install the default config to its nix store path as before. The UPower module is modified to put the config in /etc.
mat8913
force-pushed
the
upower-config-master
branch
from
December 4, 2019 01:27
9170cfe
to
f83a83f
Compare
OK, I think I've got this right. I'll close the other PR. |
ofborg
bot
added
10.rebuild-darwin: 1-10
10.rebuild-linux: 11-100
and removed
10.rebuild-darwin: 0
10.rebuild-linux: 0
labels
Dec 4, 2019
Thanks @mat8913, upower is working fine on my machine with these patches. |
dtzWill
pushed a commit
to dtzWill/nixpkgs
that referenced
this pull request
Dec 5, 2019
nixos/upower: Allow customization of UPower.conf (cherry picked from commit b12aef0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Documentation of options and default values taken from the upstream
UPower.conf. The documentation was modified slightly to make more sense
when displayed on https://nixos.org/nixos/options.html.
A copy of upstream UPower.conf can be found here:
https://cgit.freedesktop.org/upower/tree/etc/UPower.conf?id=28bd86c181e2510ef6a1dc7cfa26f97803698a79
Motivation for this change
On my laptop, the battery jumps from 20% straight down to 0%, not giving it enough time to hibernate under the default settings.
#25815
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)I tested this on my laptop running NixOS 19.09 by cherry-picking the commit onto the release branch and adding this to my config:
Notify maintainers
cc @mmahut @worldofpeace