21 lines
537 B
Nix
21 lines
537 B
Nix
{ config, lib, ... }:
|
|
{
|
|
|
|
options.nfs.client.enable = lib.mkEnableOption "Enable Nas (via NFS) as a client";
|
|
# options.nfs.server.enable = lib.mkEnableOption "Enable Nas (via NFS) as the server";
|
|
|
|
config = lib.mkIf config.nfs.client.enable {
|
|
fileSystems."/mnt/nas" = {
|
|
device = "nixserver:/share";
|
|
fsType = "nfs";
|
|
options = [
|
|
"nfsvers=4.2"
|
|
"x-systemd.automount"
|
|
"noauto"
|
|
"x-systemd.idle-timeout=600"
|
|
"x-systemd.device-timeout=1"
|
|
"_netdev"
|
|
];
|
|
};
|
|
};
|
|
}
|