refactor: abstract NFS mount creation via custom options
This commit is contained in:
parent
d4d655e735
commit
1403b1f9c0
9 changed files with 93 additions and 120 deletions
|
|
@ -42,17 +42,13 @@ in {
|
|||
shell = null;
|
||||
};
|
||||
|
||||
fileSystems."${books}" = {
|
||||
homelab.nfsMounts."${books}" = {
|
||||
device = "192.168.0.11:/mnt/SMALL/MEDIA/BOOKS";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"rw"
|
||||
extraOptions = [
|
||||
"auto"
|
||||
"nfsvers=4.2"
|
||||
"rsize=1048576" "wsize=1048576"
|
||||
"soft"
|
||||
"timeo=600" "retrans=2"
|
||||
"_netdev" "nosuid" "tcp"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -66,17 +62,13 @@ in {
|
|||
|
||||
# Calibre desktop
|
||||
(lib.mkIf cfg.desktop.enable {
|
||||
fileSystems."${calibre-config}" = {
|
||||
homelab.nfsMounts."${calibre-config}" = {
|
||||
device = "192.168.0.11:/mnt/SMALL/CONFIG/CALIBRE";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"rw"
|
||||
extraOptions = [
|
||||
"auto"
|
||||
"nfsvers=4.2"
|
||||
"rsize=1048576" "wsize=1048576"
|
||||
"soft"
|
||||
"timeo=600" "retrans=2"
|
||||
"_netdev" "nosuid" "tcp"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -124,17 +116,13 @@ in {
|
|||
|
||||
# Calibre Web
|
||||
(lib.mkIf cfg.web.enable {
|
||||
fileSystems."${calibre-web-config}" = {
|
||||
homelab.nfsMounts."${calibre-web-config}" = {
|
||||
device = "192.168.0.11:/mnt/SMALL/CONFIG/CALIBRE-WEB";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"rw"
|
||||
extraOptions = [
|
||||
"auto"
|
||||
"nfsvers=4.2"
|
||||
"rsize=1048576" "wsize=1048576"
|
||||
"soft"
|
||||
"timeo=600" "retrans=2"
|
||||
"_netdev" "nosuid" "tcp"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue