From 82f1c9be5289f487a0d85253bd8f596fd1be5470 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sat, 15 Apr 2023 19:43:09 +0200 Subject: [PATCH] mediaserver: nfs --- system/hosts/mediaserver.nix | 1 + system/nixos/mediaserver-setup.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 system/nixos/mediaserver-setup.nix diff --git a/system/hosts/mediaserver.nix b/system/hosts/mediaserver.nix index e4b4794..1d1f062 100644 --- a/system/hosts/mediaserver.nix +++ b/system/hosts/mediaserver.nix @@ -18,6 +18,7 @@ in ../nixos/tailscale.nix + ../nixos/mediaserver-setup.nix ../nixos/wireguard-netns.nix ../nixos/prowlarr.nix ]; diff --git a/system/nixos/mediaserver-setup.nix b/system/nixos/mediaserver-setup.nix new file mode 100644 index 0000000..4095760 --- /dev/null +++ b/system/nixos/mediaserver-setup.nix @@ -0,0 +1,25 @@ +{ + users.users.media_user = { + uid = 1001; + isSystemUser = true; + description = "Media User"; + }; + + users.groups.media_group = { + gid = 2001; + members = [ "media_user" ]; + }; + + services.rpcbind.enable = true; + + systemd.mounts = [ + { + type = "nfs"; + mountConfig = { + Options = "noatime"; + }; + what = "10.0.0.100:/mnt/dozer/downloads"; + where = "/mnt/downloads"; + } + ]; +}