add nfs client
This commit is contained in:
		
							parent
							
								
									035b623b42
								
							
						
					
					
						commit
						c7dce3b8c0
					
				
					 5 changed files with 18 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
 | 
			
		||||
    # services
 | 
			
		||||
    ../../shared-services/pulseaudio.nix
 | 
			
		||||
    #../../shared-services/nfs-server.nix
 | 
			
		||||
    ../../shared-services/nfs-client.nix
 | 
			
		||||
    ../../shared-services/mpd.nix
 | 
			
		||||
    ../../shared-services/ympd.nix
 | 
			
		||||
    ../../shared-services/spotifyd.nix
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
 | 
			
		||||
    # services
 | 
			
		||||
    ../../shared-services/pulseaudio.nix
 | 
			
		||||
    ../../shared-services/nfs-server.nix
 | 
			
		||||
    ../../shared-services/nfs-client.nix
 | 
			
		||||
    ../../shared-services/mpd.nix
 | 
			
		||||
    ../../shared-services/ympd.nix
 | 
			
		||||
    ../../shared-services/spotifyd.nix
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
      fsType = "vfat";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  fileSystems."/mnt" =
 | 
			
		||||
  fileSystems."/mnt/hdd" =
 | 
			
		||||
    { device = "/dev/disk/by-uuid/ff18a6f9-ee3b-452c-8671-38b74508a74c";
 | 
			
		||||
      fsType = "btrfs";
 | 
			
		||||
    };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										15
									
								
								shared-services/nfs-client.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								shared-services/nfs-client.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
{ ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  boot.supportedFilesystems = [ "nfs" ];
 | 
			
		||||
  fileSystems."/mnt/Music" = {
 | 
			
		||||
    device = "10.23.42.126:/music";
 | 
			
		||||
    fsType = "nfs";
 | 
			
		||||
    options = [
 | 
			
		||||
      "nfsvers=4.1"
 | 
			
		||||
      "noauto"
 | 
			
		||||
      "x-systemd.automount"
 | 
			
		||||
      "x-systemd.idle-timeout=600"
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,17 +0,0 @@
 | 
			
		|||
{ ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  services.nfs.server = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    exports = ''
 | 
			
		||||
      /mnt 10.23.42.0/24(rw,fsid=0,insecure,no_subtree_check)
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
    statdPort = 4000;
 | 
			
		||||
    lockdPort = 4001;
 | 
			
		||||
    mountdPort = 4002;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  networking.firewall.interfaces.enp3s0.allowedTCPPorts = [ 2049 4000 4001 4002 111 ];
 | 
			
		||||
  networking.firewall.interfaces.enp3s0.allowedUDPPorts = [ 2049 4000 4001 4002 111 ];
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue