nixos-config/common/nixos/nfs.nix
gwg313 6f1d2e268a
fix: update nfs mounts
Signed-off-by: gwg313 <gwg313@pm.me>
2025-07-09 08:03:12 -04:00

59 lines
1.3 KiB
Nix

{
config,
lib,
inputs,
...
}:
{
options = {
nfs.enable = lib.mkEnableOption "Enables NFS and sets up mounts";
};
config = lib.mkIf config.nfs.enable {
fileSystems = {
"/books" = {
device = inputs.secrets.nfs.devices.books;
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"x-systemd.after=network-online.target"
"x-systemd.mount-timeout=90"
];
};
"/music" = {
device = inputs.secrets.nfs.devices.music;
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"x-systemd.after=network-online.target"
"x-systemd.mount-timeout=90"
];
};
"/personal" = {
device = inputs.secrets.nfs.devices.personal;
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"x-systemd.after=network-online.target"
"x-systemd.mount-timeout=90"
];
};
"/backups" = {
device = inputs.secrets.nfs.devices.backups;
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"x-systemd.after=network-online.target"
"x-systemd.mount-timeout=90"
];
};
};
};
}