update h001 to autofs mount the NAS storage
This commit is contained in:
parent
34e37861a7
commit
2f049b8138
3 changed files with 27 additions and 8 deletions
18
hosts/h001/autofs.nix
Normal file
18
hosts/h001/autofs.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.nfs-utils
|
||||
];
|
||||
services.autofs = {
|
||||
enable = true;
|
||||
autoMaster =
|
||||
let
|
||||
conf = pkgs.writeText "nfs" ''
|
||||
h002 -fstype=nfs4,rw,nofail,nfsvers=4 h002:/
|
||||
'';
|
||||
in
|
||||
''
|
||||
/nfs file:${conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue