summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/vidhar/samba.nix47
1 files changed, 31 insertions, 16 deletions
diff --git a/hosts/vidhar/samba.nix b/hosts/vidhar/samba.nix
index 506edaae..af1581c5 100644
--- a/hosts/vidhar/samba.nix
+++ b/hosts/vidhar/samba.nix
@@ -61,22 +61,31 @@
61 interface = [ "lo" "lan" ]; 61 interface = [ "lo" "lan" ];
62 }; 62 };
63 63
64 fileSystems."/srv/eos.lower" = { 64 systemd.mounts = [
65 device = "/dev/zvol/hdd-raid6/safe/home/mherold/eos/base"; 65 {
66 fsType = "ntfs"; 66 where = "/srv/eos.lower";
67 options = [ "ro" "uid=mherold" "gid=users" "fmask=0177" "dmask=0077" "nofail" "noauto" ]; 67 what = "/dev/zvol/hdd-raid6/safe/home/mherold/eos/base";
68 }; 68 type = "ntfs";
69 options = lib.concatStringsSep ","
70 [ "ro"
71 "uid=mherold" "gid=users" "fmask=0177" "dmask=0077"
72 "nofail"
73 ];
69 74
70 fileSystems."/srv/eos.upper" = { 75 unitConfig.StopWhenUnneeded = true;
71 device = "/dev/zvol/hdd-raid6/safe/home/mherold/eos/upper"; 76 }
72 fsType = "ext4"; 77 {
73 options = [ "nofail" "noauto" ]; 78 where = "/srv/eos.upper";
74 }; 79 what = "/dev/zvol/hdd-raid6/safe/home/mherold/eos/upper";
80 type = "ext4";
81 options = lib.concatStringsSep ","
82 [ "nofail"
83 ];
75 84
76 systemd.mounts = [ 85 unitConfig.StopWhenUnneeded = true;
86 }
77 { 87 {
78 wantedBy = [ "samba-smbd.service" ]; 88 bindsTo = [ "srv-eos.lower.mount" "srv-eos.upper.mount" ];
79 before = [ "samba-smbd.service" ];
80 89
81 where = "/srv/eos"; 90 where = "/srv/eos";
82 what = "overlay"; 91 what = "overlay";
@@ -86,10 +95,16 @@
86 "upperdir=/srv/eos.upper/upper" 95 "upperdir=/srv/eos.upper/upper"
87 "workdir=/srv/eos.upper/work" 96 "workdir=/srv/eos.upper/work"
88 ]; 97 ];
98 }
99 ];
100 systemd.automounts = [
101 {
102 wantedBy = [ "samba-smbd.service" ];
103 before = [ "samba-smbd.service" ];
89 104
90 unitConfig = { 105 where = "/srv/eos";
91 RequiresMountsFor = [ "/srv/eos.lower" "/srv/eos.upper" ]; 106
92 }; 107 automountConfig.TimeoutIdleSec = "5m";
93 } 108 }
94 ]; 109 ];
95 }; 110 };