From e00cfe41ebeb8c3a2d4142160013aa1590d5eb7f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 20 Apr 2018 14:20:46 +0200 Subject: samba instead of nfs --- bragi.nix | 14 +------------- odin.nix | 20 ++++++-------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/bragi.nix b/bragi.nix index f2c9d5aa..ba615e97 100644 --- a/bragi.nix +++ b/bragi.nix @@ -140,10 +140,6 @@ in rec { }; systemd.automounts = [ - { - wantedBy = [ "multi-user.target" ]; - where = "/media/odin"; - } { wantedBy = [ "multi-user.target" ]; where = "/media/dellingr"; @@ -157,12 +153,6 @@ in rec { ]; systemd.mounts = [ - { - what = "odin.asgard.yggdrasil:/srv/media"; - where = "/media/odin"; - type = "nfs"; - options = "ro"; - } { what = "/dev/disk/by-uuid/6436-3432"; where = "/media/dellingr"; @@ -234,7 +224,7 @@ in rec { services.mpd = { enable = true; - musicDirectory = "/media/odin/music"; + musicDirectory = "smb://odin.asgard.yggdrasil/media/music"; network.listenAddress = "any"; # Just so the module won't produce a bind_to_adress line extraConfig = '' bind_to_address "bragi.bragisheimr.yggdrasil" @@ -267,8 +257,6 @@ in rec { group = "audio"; }; - security.wrappers = { "mount.nfs".source = "${pkgs.nfs-utils}/bin/mount.nfs"; }; - programs.bash.promptInit = '' PROMPT_COLOR="1;31m" return $UID && PROMPT_COLOR="1;32m" diff --git a/odin.nix b/odin.nix index 34ad166e..cddbb5a4 100644 --- a/odin.nix +++ b/odin.nix @@ -64,16 +64,12 @@ allowPing = true; allowedTCPPorts = [ 22 # ssh 139 445 # samba - 111 2049 # nfs ]; allowedTCPPortRanges = [ { from = 8080; to = 8080; } # motion - { from = 4000; to = 4002; } # nfs ]; allowedUDPPorts = [ 137 138 # samba - 111 2049 # nfs ]; allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh - { from = 4000; to = 4002; } # nfs ]; }; @@ -208,6 +204,12 @@ writable = true; path = "/srv/eos"; }; + + media = { + browseable = true; + writable = false; + path = "/srv/media"; + }; }; extraConfig = '' domain master = true @@ -299,16 +301,6 @@ members = [ "motion" ]; }; - services.nfs.server = { - enable = true; - exports = '' - /srv/media *(ro,insecure,all_squash,no_subtree_check,mp) - ''; - lockdPort = 4001; - mountdPort = 4002; - statdPort = 4000; - }; - virtualisation.libvirtd = { enable = true; }; -- cgit v1.2.3