add nfs share instead of sshfs
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
./copyparty.nix
|
./copyparty.nix
|
||||||
./trilium.nix
|
./trilium.nix
|
||||||
./actual.nix
|
./actual.nix
|
||||||
|
./nfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "usb_storage" ];
|
boot.initrd.kernelModules = [ "usb_storage" ];
|
||||||
@@ -65,6 +66,8 @@
|
|||||||
|
|
||||||
53
|
53
|
||||||
|
|
||||||
|
2049 # nfs
|
||||||
|
|
||||||
5690 # testing for wizarr
|
5690 # testing for wizarr
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -107,5 +107,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.copyparty = {
|
||||||
|
serviceConfig = {
|
||||||
|
IOSchedulingClass = "best-effort";
|
||||||
|
IOSchedulingPriority = 7;
|
||||||
|
|
||||||
|
IOWeight = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8086 ];
|
networking.firewall.allowedTCPPorts = [ 8086 ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{...}: {
|
||||||
|
fileSystems = {
|
||||||
|
"/exports/mediacenter" = {
|
||||||
|
device = "/mnt/mediacenter";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
# "/exports/jellyfin" = {
|
||||||
|
# device = "/mnt/jellyfin";
|
||||||
|
# fsType = "none";
|
||||||
|
# options = [ "bind" ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nfs = let
|
||||||
|
exports_config = n : {
|
||||||
|
"192.168.1.12" = [ # thea
|
||||||
|
"rw"
|
||||||
|
"fsid=${n}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
server = {
|
||||||
|
enable = true;
|
||||||
|
exports = {
|
||||||
|
"/exports/jellyfin" = exports_config "1";
|
||||||
|
"/exports/mediacenter" = exports_config "2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -28,6 +28,7 @@ in
|
|||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.supportedFilesystems = [ "fuse.sshfs" "nfs" ];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "thea"; # Define your hostname.
|
hostName = "thea"; # Define your hostname.
|
||||||
@@ -42,6 +43,7 @@ in
|
|||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
nodes.sin.config.services.gitea.settings.server.SSH_PORT
|
nodes.sin.config.services.gitea.settings.server.SSH_PORT
|
||||||
993 # mail port
|
993 # mail port
|
||||||
|
2049 # nfs
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
# minecraft ad hoc server ports
|
# minecraft ad hoc server ports
|
||||||
|
|||||||
@@ -4,15 +4,8 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems."/mnt/mediacenter" = {
|
fileSystems."/mnt/mediacenter" = {
|
||||||
device = "shobu@${sin-address}:/mnt/mediacenter";
|
device = "${sin-address}:/exports/mediacenter";
|
||||||
fsType = "sshfs";
|
fsType = "nfs4";
|
||||||
options = [
|
|
||||||
"nodev"
|
|
||||||
"noatime"
|
|
||||||
"allow_other"
|
|
||||||
"user=n100"
|
|
||||||
"IdentityFile=/root/.ssh/id_ed25519"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/jellyfin" = {
|
fileSystems."/mnt/jellyfin" = {
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ in
|
|||||||
typesHashMaxSize = 512;
|
typesHashMaxSize = 512;
|
||||||
mapHashMaxSize = 512;
|
mapHashMaxSize = 512;
|
||||||
|
|
||||||
|
appendHttpConfig = ''
|
||||||
|
limit_conn_zone $binary_remote_addr zone=copyparty_dl:10m;
|
||||||
|
'';
|
||||||
|
|
||||||
virtualHosts =
|
virtualHosts =
|
||||||
let
|
let
|
||||||
mkVHost =
|
mkVHost =
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ let
|
|||||||
sin-address = "192.168.1.14";
|
sin-address = "192.168.1.14";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
boot.supportedFilesystems = [ "fuse.sshfs" ];
|
|
||||||
programs.fuse.userAllowOther = true;
|
programs.fuse.userAllowOther = true;
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
|
|||||||
Reference in New Issue
Block a user