added more config for nfs mounts
This commit is contained in:
parent
f5c67b812f
commit
1e98b54454
6 changed files with 27 additions and 10 deletions
|
@ -7,7 +7,6 @@
|
|||
jellyfinPort = 8096;
|
||||
jellyfin_data_directory = "/var/lib/jellyfin";
|
||||
jellyfin_cache_directory = "/var/cache/jellyfin";
|
||||
jellyfin_media_directory = "/srv/jellyfin/media";
|
||||
in {
|
||||
options.host.jellyfin = {
|
||||
enable = lib.mkEnableOption "should jellyfin be enabled on this computer";
|
||||
|
@ -21,6 +20,11 @@ in {
|
|||
description = "ex subdomain of base domain that jellyfin will be hosted at";
|
||||
default = [];
|
||||
};
|
||||
media_directory = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "directory jellyfin media will be hosted at";
|
||||
default = "/srv/jellyfin/media";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.host.jellyfin.enable (
|
||||
|
@ -126,7 +130,7 @@ in {
|
|||
hideMounts = true;
|
||||
directories = [
|
||||
{
|
||||
directory = jellyfin_media_directory;
|
||||
directory = config.host.jellyfin.media_directory;
|
||||
user = "jellyfin";
|
||||
group = "jellyfin_media";
|
||||
mode = "1770";
|
||||
|
|
|
@ -57,7 +57,7 @@ in {
|
|||
# create any folders that we need to have for our exports
|
||||
systemd.tmpfiles.rules =
|
||||
[
|
||||
"d ${config.host.network_storage.export_directory} 2770 root root -"
|
||||
"d ${config.host.network_storage.export_directory} 2775 root root -"
|
||||
]
|
||||
++ (
|
||||
builtins.map (
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = lib.strings.concatLines (
|
||||
builtins.map (
|
||||
directory: "${directory._directory} 100.64.0.0/10(rw,sync,no_subtree_check,crossmnt)"
|
||||
lib.lists.imap0 (
|
||||
i: directory: "${directory._directory} 100.64.0.0/10(rw,sync,no_subtree_check,crossmnt,fsid=${builtins.toString i})"
|
||||
)
|
||||
(
|
||||
builtins.filter (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue