changed nfs from fstab to autofs
This commit is contained in:
parent
ad813fe996
commit
7982f05122
1 changed files with 13 additions and 4 deletions
|
@ -1,9 +1,18 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
fileSystems."/mnt/nfs" = {
|
environment.systemPackages = with pkgs; [
|
||||||
device = "192.168.178.19:/roms";
|
nfs-utils
|
||||||
fsType = "nfs";
|
];
|
||||||
|
services.autofs = {
|
||||||
|
enable = true;
|
||||||
|
autoMaster = let
|
||||||
|
mapConf = pkgs.writeText "auto.nfs" ''
|
||||||
|
roms -fstype=nfs4 192.168.178.19:/roms
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
/mnt/nfs ${mapConf}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue