diff options
-rw-r--r-- | bragi.nix | 14 | ||||
-rw-r--r-- | odin.nix | 20 |
2 files changed, 7 insertions, 27 deletions
@@ -142,10 +142,6 @@ in rec { | |||
142 | systemd.automounts = [ | 142 | systemd.automounts = [ |
143 | { | 143 | { |
144 | wantedBy = [ "multi-user.target" ]; | 144 | wantedBy = [ "multi-user.target" ]; |
145 | where = "/media/odin"; | ||
146 | } | ||
147 | { | ||
148 | wantedBy = [ "multi-user.target" ]; | ||
149 | where = "/media/dellingr"; | 145 | where = "/media/dellingr"; |
150 | automountConfig.TimoutIdleSec = "30s"; | 146 | automountConfig.TimoutIdleSec = "30s"; |
151 | } | 147 | } |
@@ -158,12 +154,6 @@ in rec { | |||
158 | 154 | ||
159 | systemd.mounts = [ | 155 | systemd.mounts = [ |
160 | { | 156 | { |
161 | what = "odin.asgard.yggdrasil:/srv/media"; | ||
162 | where = "/media/odin"; | ||
163 | type = "nfs"; | ||
164 | options = "ro"; | ||
165 | } | ||
166 | { | ||
167 | what = "/dev/disk/by-uuid/6436-3432"; | 157 | what = "/dev/disk/by-uuid/6436-3432"; |
168 | where = "/media/dellingr"; | 158 | where = "/media/dellingr"; |
169 | type = "vfat"; | 159 | type = "vfat"; |
@@ -234,7 +224,7 @@ in rec { | |||
234 | 224 | ||
235 | services.mpd = { | 225 | services.mpd = { |
236 | enable = true; | 226 | enable = true; |
237 | musicDirectory = "/media/odin/music"; | 227 | musicDirectory = "smb://odin.asgard.yggdrasil/media/music"; |
238 | network.listenAddress = "any"; # Just so the module won't produce a bind_to_adress line | 228 | network.listenAddress = "any"; # Just so the module won't produce a bind_to_adress line |
239 | extraConfig = '' | 229 | extraConfig = '' |
240 | bind_to_address "bragi.bragisheimr.yggdrasil" | 230 | bind_to_address "bragi.bragisheimr.yggdrasil" |
@@ -267,8 +257,6 @@ in rec { | |||
267 | group = "audio"; | 257 | group = "audio"; |
268 | }; | 258 | }; |
269 | 259 | ||
270 | security.wrappers = { "mount.nfs".source = "${pkgs.nfs-utils}/bin/mount.nfs"; }; | ||
271 | |||
272 | programs.bash.promptInit = '' | 260 | programs.bash.promptInit = '' |
273 | PROMPT_COLOR="1;31m" | 261 | PROMPT_COLOR="1;31m" |
274 | return $UID && PROMPT_COLOR="1;32m" | 262 | return $UID && PROMPT_COLOR="1;32m" |
@@ -64,16 +64,12 @@ | |||
64 | allowPing = true; | 64 | allowPing = true; |
65 | allowedTCPPorts = [ 22 # ssh | 65 | allowedTCPPorts = [ 22 # ssh |
66 | 139 445 # samba | 66 | 139 445 # samba |
67 | 111 2049 # nfs | ||
68 | ]; | 67 | ]; |
69 | allowedTCPPortRanges = [ { from = 8080; to = 8080; } # motion | 68 | allowedTCPPortRanges = [ { from = 8080; to = 8080; } # motion |
70 | { from = 4000; to = 4002; } # nfs | ||
71 | ]; | 69 | ]; |
72 | allowedUDPPorts = [ 137 138 # samba | 70 | allowedUDPPorts = [ 137 138 # samba |
73 | 111 2049 # nfs | ||
74 | ]; | 71 | ]; |
75 | allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh | 72 | allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh |
76 | { from = 4000; to = 4002; } # nfs | ||
77 | ]; | 73 | ]; |
78 | }; | 74 | }; |
79 | 75 | ||
@@ -208,6 +204,12 @@ | |||
208 | writable = true; | 204 | writable = true; |
209 | path = "/srv/eos"; | 205 | path = "/srv/eos"; |
210 | }; | 206 | }; |
207 | |||
208 | media = { | ||
209 | browseable = true; | ||
210 | writable = false; | ||
211 | path = "/srv/media"; | ||
212 | }; | ||
211 | }; | 213 | }; |
212 | extraConfig = '' | 214 | extraConfig = '' |
213 | domain master = true | 215 | domain master = true |
@@ -299,16 +301,6 @@ | |||
299 | members = [ "motion" ]; | 301 | members = [ "motion" ]; |
300 | }; | 302 | }; |
301 | 303 | ||
302 | services.nfs.server = { | ||
303 | enable = true; | ||
304 | exports = '' | ||
305 | /srv/media *(ro,insecure,all_squash,no_subtree_check,mp) | ||
306 | ''; | ||
307 | lockdPort = 4001; | ||
308 | mountdPort = 4002; | ||
309 | statdPort = 4000; | ||
310 | }; | ||
311 | |||
312 | virtualisation.libvirtd = { | 304 | virtualisation.libvirtd = { |
313 | enable = true; | 305 | enable = true; |
314 | }; | 306 | }; |