-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
tlpui: init at 1.6.5 #305278
base: master
Are you sure you want to change the base?
tlpui: init at 1.6.5 #305278
Conversation
TODO: I do need to do more testing in terms of how tlpui reads default values. At a quick glance everything seemed fine, but i can't quite tell. I need to especially crossreference with a tlpui install on a known-good distro. |
Update: If anyone familiar enough with tlpui to know how we can set it to use a config in /etc/tlp.d/* ? One option would be to patch the path lookup in https://github.com/d4nj1/TLPUI/blob/master/tlpui/settingshelper.py#L23 but that might not be the best of ideas |
Yes, it's intended. Sorry I cannot test it for now. |
All good, take your time. These are chaotic and turbulent times and this is not a pressing issue. I can run this PR just fine until we have a better method and a more stable situation overall.... |
Alright, i adjusted this pull request. It no longer needs to modify the tlp nixos module.
|
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.
Also should avoid double wrapping (See #303848)
substituteAll, | ||
tlp, | ||
usbutils, | ||
wrapGAppsHook, |
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.
It has been renamed to wrapGAppsHook3
to avoid confusion.
This is logically correct, but it is better to mention it in
This is also acceptable. By the way, I'd recommend always adding new module after package, in two separate PRs, to improve the efficiency of reviewing. |
Description of changes
link the empty default config of tlp into the legacy config path of tlp to make it work even without explicit config in /etc/tlp.confmove nixos tlp module to use/etc/tlp.d/
as to not break the tlp config created imperatively with tlpui in /etc/tlp.confThis PR reuses work by @GeorgesAlkhouri in #188278, but with an updated nix package to use pyproj and an updated patchset to use the tlp default config in the tlp store path if the explicit tlp config in /etc/tlp.conf does not yet exist.
I tested this PR on my local system and it works well as far as i can tell.
I understand this is a relatively big scale for tlp as a whole, not just a simple package addition, feedback is welcome.Edit: i adjusted this pull request. It no longer needs to modify the tlp nixos module.
Instead, the tlp nixos module is now completely untouched and still applies its config in the global config location of /etc/tlp.conf. tlpui places its config files in /etc/tlp.d/30-tlpui.conf instead.
This approach has a couple interesting quirks but is an overall improvement:
Ideally, I'd write a nixos module for tlpui instead, with tlpui writing to a special location and the nixos module symlinking the config result into place ensuring both tlp.d exists and is being properly cleaned up on uninstall.
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.