diff --git a/hosts/media-server/configuration.nix b/hosts/media-server/configuration.nix index d24a4bf..9e5b980 100644 --- a/hosts/media-server/configuration.nix +++ b/hosts/media-server/configuration.nix @@ -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 = { diff --git a/modules/system/filesystems-filez.nix b/modules/system/filesystems-filez.nix index eb29eae..2ef98e2 100644 --- a/modules/system/filesystems-filez.nix +++ b/modules/system/filesystems-filez.nix @@ -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; }; diff --git a/modules/system/filesystems-media-server.nix b/modules/system/filesystems-media-server.nix index 61d9900..4d056c2 100644 --- a/modules/system/filesystems-media-server.nix +++ b/modules/system/filesystems-media-server.nix @@ -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; }; }; }