1
0
Fork 0
dotfiles/system/nixos/mediaserver-setup.nix

95 lines
1.8 KiB
Nix
Raw Normal View History

2023-04-15 18:04:09 +00:00
{ pkgs, ... }:
2023-04-15 17:43:09 +00:00
{
2023-04-15 17:45:16 +00:00
users.groups.media_group = {
gid = 2001;
};
2023-04-15 17:43:09 +00:00
users.users.media_user = {
uid = 1001;
isSystemUser = true;
description = "Media User";
2023-04-15 17:45:16 +00:00
group = "media_group";
2023-04-15 17:43:09 +00:00
};
2023-04-15 18:12:26 +00:00
boot.supportedFilesystems = [ "nfs" ];
2023-04-15 18:04:09 +00:00
environment.systemPackages = [ pkgs.nfs-utils ];
2023-04-15 17:43:09 +00:00
services.rpcbind.enable = true;
2023-04-15 17:51:58 +00:00
systemd = {
mounts = [
{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "10.0.0.100:/mnt/dozer/downloads";
where = "/mnt/downloads";
}
2023-04-15 21:29:25 +00:00
{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "10.0.0.100:/mnt/dozer/media/TV Shows";
where = "/mnt/media/TV Shows";
}
{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "10.0.0.100:/mnt/dozer/media/Documentaries";
where = "/mnt/media/Documentaries";
}
{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "10.0.0.100:/mnt/dozer/MediaVault/Anime";
where = "/mnt/media/Anime";
}
{
type = "nfs";
mountConfig = {
Options = "noatime";
};
what = "10.0.0.100:/mnt/dozer/media/Movies";
where = "/mnt/media/Movies";
}
2023-04-15 17:51:58 +00:00
];
automounts = [
{
wantedBy = [ "multi-user.target" ];
where = "/mnt/downloads";
}
2023-04-15 21:29:25 +00:00
{
wantedBy = [ "multi-user.target" ];
where = "/mnt/media/TV Shows";
}
{
wantedBy = [ "multi-user.target" ];
where = "/mnt/media/Documentaries";
}
{
wantedBy = [ "multi-user.target" ];
where = "/mnt/media/Anime";
}
{
wantedBy = [ "multi-user.target" ];
where = "/mnt/media/Movies";
}
2023-04-15 17:51:58 +00:00
];
};
2023-04-15 17:43:09 +00:00
}