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/jellyfin: add data dir options #233617
Conversation
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.
From a cursory glance, this looks fine. However, I'm unable to test this.
Tentatively approving, this looks like a simple change.
Jellyfin data directory. | ||
''; | ||
}; | ||
|
||
cacheDir = mkOption { | ||
type = types.path; | ||
default = "/var/cache/jellyfin"; | ||
description = lib.mdDoc '' | ||
Jellyfin cache data directory. |
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.
The service name is duplicated with the path and the description is rather none descriptive.
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.
I think it's ok to keep these explicitly set here with the hardcoded 'jellyfin' in the name. We don't want the defaults to accidentally change as that will break existing setups. Most other services I see (eg postgresql) use the repeated names rather than abstracting it out to another variable
"~@clock" | ||
"~@aio" | ||
"~@chown" | ||
"~@cpu-emulation" | ||
"~@debug" | ||
"~@keyring" | ||
"~@memlock" | ||
"~@module" | ||
"~@mount" | ||
"~@obsolete" | ||
"~@privileged" | ||
"~@raw-io" | ||
"~@reboot" | ||
"~@setuid" | ||
"~@swap" | ||
]; |
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.
"~@clock" | |
"~@aio" | |
"~@chown" | |
"~@cpu-emulation" | |
"~@debug" | |
"~@keyring" | |
"~@memlock" | |
"~@module" | |
"~@mount" | |
"~@obsolete" | |
"~@privileged" | |
"~@raw-io" | |
"~@reboot" | |
"~@setuid" | |
"~@swap" | |
]; | |
"~@clock @aio @chown @cpu-emulation @debug @keyring @memlock @module @mount" @obsolete @privileged @raw-io @reboot @setuid @swap" | |
]; |
this should be the same but in one line of the service file instead of ~15
Is this getting merged? Hopefully in time for NixOS 23.11. |
I have tested this and am currently running it on two Jellyfin setups. One on bare metal and one inside a NixOS Container. Everything has worked as expected. |
Closing in favor of #277220 |
Description of changes
add
dataDir
andcacheDir
as options to the module for jellyfindataDir
is useful for jellyfin as theres no current way to manage jellyfin config with nix, the management of its state should be easy.this should close #141367
cacheDir
is included because it was mentioned in the relavent issue.they both default to existing behaviour so this should not impact current users.
systemd tmpfile rules are used to ensure the paths exist with the right permissions so the previously related entries in the service config are removed
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)