switching all smb to nfs
This commit is contained in:
parent
a1434cee4e
commit
68c5ca2ce7
3 changed files with 9 additions and 42 deletions
|
@ -61,7 +61,7 @@
|
|||
|
||||
networking.hostName = "media-server"; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 3000 ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 2049 ];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Toronto";
|
||||
|
@ -132,42 +132,11 @@
|
|||
server = {
|
||||
enable = true;
|
||||
exports = ''
|
||||
/mnt/shares/import *(rw,fsid=0,no_subtree_check)
|
||||
/mnt/shares/import *(rw,fsid=0,no_subtree_check,nohide,insecure,crossmnt)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# services.samba = {
|
||||
# enable = true;
|
||||
# package = pkgs.sambaFull;
|
||||
# openFirewall = true;
|
||||
# settings = {
|
||||
# global = {
|
||||
# "workgroup" = "WORKGROUP";
|
||||
# "server string" = "media-server";
|
||||
# "netbios name" = "media-server";
|
||||
# "security" = "user";
|
||||
# # "hosts allow" = "192.168.50. 127.0.0.1 localhost";
|
||||
# # "hosts deny" = "0.0.0.0/0";
|
||||
# "guest account" = "nobody";
|
||||
# "map to guest" = "bad user";
|
||||
# };
|
||||
# "import" = {
|
||||
# "path" = "/mnt/shares/import";
|
||||
# "browseable" = "yes";
|
||||
# "read only" = "no";
|
||||
# "guest ok" = "no";
|
||||
# "create mask" = "0644";
|
||||
# "directory mask" = "0755";
|
||||
# "force user" = "media";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# services.samba-wsdd = {
|
||||
# enable = true;
|
||||
# openFirewall = true;
|
||||
# };
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
programs.nh = {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
fileSystems =
|
||||
let
|
||||
opts = [ "nfsvers=4.1" "noatime" "noauto" ];
|
||||
opts = [ "nfsvers=4.1" "noatime" "noauto" "x-systemd.automount" ];
|
||||
in {
|
||||
|
||||
"/mnt/filez/media" = {
|
||||
|
@ -16,7 +16,7 @@
|
|||
};
|
||||
|
||||
"/mnt/filez/music-production" = {
|
||||
device = "filez:/volume1/Music Production";
|
||||
device = "filez:/volume1/MusicProduction";
|
||||
fsType = "nfs";
|
||||
options = opts;
|
||||
};
|
||||
|
@ -28,7 +28,7 @@
|
|||
};
|
||||
|
||||
"/mnt/filez/photos" = {
|
||||
device = "filez:/volume1/Photo Storage";
|
||||
device = "filez:/volume1/Photos";
|
||||
fsType = "nfs";
|
||||
options = opts;
|
||||
};
|
||||
|
|
|
@ -3,15 +3,13 @@
|
|||
{
|
||||
fileSystems =
|
||||
let
|
||||
automount-opts = "x-systemd.automount,noauto,users,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,noperm,uid=1000";
|
||||
# filez-opts = automount-opts + ",credentials=/etc/nixos/filez-secrets";
|
||||
media-server-opts = automount-opts + ",credentials=/etc/nixos/media-server-secrets";
|
||||
opts = [ "nfsvers=4.1" "noatime" "noauto" "x-systemd.automount" ];
|
||||
in {
|
||||
|
||||
"/mnt/import" = {
|
||||
device = "//media-server/import";
|
||||
fsType = "smb3";
|
||||
options = [ "${media-server-opts}" ];
|
||||
device = "media-server:/import";
|
||||
fsType = "nfs";
|
||||
options = opts;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue