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/mpd: support passwords in separate files #107508

Merged
merged 2 commits into from Jan 9, 2021

Conversation

Sohalt
Copy link
Contributor

@Sohalt Sohalt commented Dec 24, 2020

This allows to use files containing only the mpd password without the
permissions, making it easier for other programs connecting to mpd to read the
password from the same password file.

This would for example allow #97553 to automatically specify a reasonable default for a passwordFile.

This allows to use files containing only the mpd password without the
permissions, making it easier for other programs connecting to mpd to read the
password from the same password file.
@Sohalt Sohalt mentioned this pull request Dec 26, 2020
10 tasks
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Works. Thanks :).

@doronbehar doronbehar merged commit 70d194c into NixOS:master Jan 9, 2021
@gravndal
Copy link
Contributor

@Sohalt @doronbehar This breaks the mpd service if services.mpd.credentials is empty, the generated exec-pre script ends up like so:

#!/nix/store/zcl19h06322c3kss6bvf05w2pxg4kfll-bash-4.4-p23/bin/bash
set -euo pipefail
install -m 600 /nix/store/5gklrsfnwmljgl28srlrf165c3ypsmkz-mpd.conf /run/mpd/mpd.conf
/nix/store/y100hz2wmq402bq58jrmam4b0qyb4jmv-replace-2.24/bin/replace-literal -fe  /run/mpd/mpd.conf

Which obviously fails.

@doronbehar
Copy link
Contributor

Damn. I should have ran the nixos test for this, it would have catch that. Ran it with the changes in #108981 .

@Sohalt
Copy link
Contributor Author

Sohalt commented Jan 10, 2021

Ooops, sorry :/

@Sohalt Sohalt deleted the mpd-credentials branch January 10, 2021 22:34
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.

None yet

4 participants