Merged
Conversation
Adaptation of NixOS#282337 to use `util-linux` as `lastlog2` provider Co-Authored-By: Maxine Aubrey <[email protected]>
0fb83e9 to
a513c2e
Compare
Majiir
reviewed
Aug 10, 2025
Comment on lines
+2314
to
+2319
| systemd = lib.optionalAttrs config.security.pam.services.login.updateWtmp { | ||
| tmpfiles.packages = [ pkgs.util-linux.lastlog ]; # /lib/tmpfiles.d/lastlog2-tmpfiles.conf | ||
| services.lastlog2-import.enable = true; | ||
| packages = [ pkgs.util-linux.lastlog ]; # lib/systemd/system/lastlog2-import.service | ||
| }; | ||
|
|
Contributor
There was a problem hiding this comment.
I had marked this PR to review more closely, but I see it was merged before I got the chance.
As noted on the previous attempt, this shouldn't privilege the login service here, but should instead check the updateWtmp option on all PAM services. You can use the enabledServices attrset for this.
Contributor
Author
There was a problem hiding this comment.
fair enough, i can do that in a follow-up. Any changes to the modules here at least won't be mass-rebuilds.
Contributor
Author
There was a problem hiding this comment.
Proposed #432567 as a fix, waiting for builds to finish before undrafting.
13 tasks
13 tasks
This file contains hidden or 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
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.
Adaptation of #282337 to use
util-linuxaslastlog2providercloses #429075
This does pass the nixos tests. However, the following log message might be concerning (flagged as error from tmpfiles):
/etc/tmpfiles.d/uuidd-tmpfiles.conf:6: Failed to resolve user 'uuidd': No such processOne option to fix this is to move all the relevant lastlog outputs ofutil-linuxto a clean$lastlogoutput, which would contain the lastlog libs, service and tmpfiles definitions while not overly polluting the scope. There might be better ways, i am not sure. Until it is decided how (and whether) to treat this log output, this is a draft.Fixed by separating
lastlogto its own output inutil-linux.cc @arianvp
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.