added an nfsv2 module.
This commit is contained in:
		
							parent
							
								
									fac5efd7b2
								
							
						
					
					
						commit
						e641a643af
					
				
					 2 changed files with 30 additions and 0 deletions
				
			
		| 
						 | 
					@ -19,10 +19,12 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
    ../../modules/nixos/printing.nix
 | 
					    ../../modules/nixos/printing.nix
 | 
				
			||||||
    ../../modules/both/sound.nix
 | 
					    ../../modules/both/sound.nix
 | 
				
			||||||
    ../../modules/nixos/networking.nix
 | 
					    ../../modules/nixos/networking.nix
 | 
				
			||||||
 | 
					    ../../modules/nixos/nfsv2.nix
 | 
				
			||||||
    ../../modules/both/i3
 | 
					    ../../modules/both/i3
 | 
				
			||||||
    ({
 | 
					    ({
 | 
				
			||||||
      config,
 | 
					      config,
 | 
				
			||||||
      pkgs,
 | 
					      pkgs,
 | 
				
			||||||
 | 
					      lib,
 | 
				
			||||||
      ...
 | 
					      ...
 | 
				
			||||||
    }: {
 | 
					    }: {
 | 
				
			||||||
      host = {
 | 
					      host = {
 | 
				
			||||||
| 
						 | 
					@ -85,6 +87,11 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
      # Enable the OpenSSH daemon.
 | 
					      # Enable the OpenSSH daemon.
 | 
				
			||||||
      services.openssh.enable = true;
 | 
					      services.openssh.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      services.nfs.server = {
 | 
				
			||||||
 | 
					        enable = true;
 | 
				
			||||||
 | 
					        exports = "/srv/nfs *(rw,sync,no_root_squash,no_subtree_check)";
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Bootloader.
 | 
					      # Bootloader.
 | 
				
			||||||
      boot.loader.systemd-boot.enable = true;
 | 
					      boot.loader.systemd-boot.enable = true;
 | 
				
			||||||
      boot.loader.efi.canTouchEfiVariables = true;
 | 
					      boot.loader.efi.canTouchEfiVariables = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										23
									
								
								modules/nixos/nfsv2.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								modules/nixos/nfsv2.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}: {
 | 
				
			||||||
 | 
					  # will force you to compile kernel locally.
 | 
				
			||||||
 | 
					  services.nfs = {
 | 
				
			||||||
 | 
					    settings = {
 | 
				
			||||||
 | 
					      nfsd.vers2 = true;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    server.enable = true;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					  boot.kernelPatches = [
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      name = "nfsv2";
 | 
				
			||||||
 | 
					      patch = null;
 | 
				
			||||||
 | 
					      extraStructuredConfig = {
 | 
				
			||||||
 | 
					        NFSD_V2 = lib.kernel.yes;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue