[Feature Request]: home-manager module #2879
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#2879
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Preflight Checklist
Problem Description
Hey, has anyone considered a home-manager module
Proposed Solution
create a home-manager module that allows one to configure the plugins and the settings, and also options
Alternatives Considered
none
Additional Information
none
Could you provide relevant documentation?
https://nix-community.github.io/home-manager/index.xhtml#ch-writing-modules
It's possible to configure youtube-music's
config.json
file using home manager, but since the nix store is read-only, youtube-music can't write toconfig.json
anymore (it uses it to store some values).So it's somewhat doable, but I think it would be better to not touch
config.json
. It would be nice to have separatemy-config.json
files managed by the user, or home manager in this case, and a way to select/import it. Something similar to #1384Here's a basic hm module https://github.com/h-banii/youtube-music-nix
(I didn't implement all plugins though, just a few for testing)edit: I finished implementing all the options, I haven't tested all of them, but they should probably work
@h-banii I think the point of nix is for the system to be declarative so why would youtube-music need to write to the config.json?
edit: can we talk on discord?
@Lalit64 we are writing to the config.json for various reasons, one of them is config migration from an older version to a newer version.
Another reason is, if you have the setting to continue where you left off, it saves the current url to the config, an immutable config would render this useless
It would be better to have a user-config, like an override, using a secondary file managed by nix, just like how @h-banii proposed
@ArjixWasTaken Ok, I understand
Just to give an update on this:
I decided to copy the
config.json
file instead of symlinking it to the store (to avoid the read-only problem)So technically the home manager module at https://github.com/h-banii/youtube-music-nix is in a functional state now
I added a documentation for all the options in the repo's github page
https://h-banii.github.io/youtube-music-nix/pages/home-manager/