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

nixos/prometheus-exporters: fix user generation #67877

Merged
merged 1 commit into from Sep 1, 2019

Conversation

WilliButz
Copy link
Member

Motivation for this change

fixes #67874

Things done

The first of the two/three faulty lines was produced by using

users.users = mkIf ..

instead of

users.users.<name> = mkIf ...

The second was caused by the use of a multiline string for the user description, which produced a trailing newline in the decription and therefore the second error in /etc/passwd.

  • 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 nix-review --run "nix-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@ivan ivan left a comment

Choose a reason for hiding this comment

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

Thanks! I confirmed that /etc/passwd is fine now.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

Also built and tested locally 👍

@Ma27 Ma27 merged commit d8d759b into NixOS:master Sep 1, 2019
@WilliButz WilliButz deleted the fix/67874 branch September 2, 2019 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling services.prometheus.exporters.node writes bad line to /etc/passwd
3 participants