From ef2faad1898fd16dd9c99411a625b37499febf0e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 9 Aug 2017 18:53:29 +0200 Subject: systemd automounts instead of autofs --- bragi.nix | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/bragi.nix b/bragi.nix index 68a4e017..fadf6349 100644 --- a/bragi.nix +++ b/bragi.nix @@ -74,18 +74,31 @@ in rec { ''; }; - services.autofs = { - enable = true; - autoMaster = let - mapConf = pkgs.writeText "auto" '' - odin -fstype=nfs,ro odin.asgard.yggdrasil:/srv/media - dellingr -fstype=vfat,ro /dev/disk/by-uuid/6436-3432 - vali -fstype=cifs,guest //VALI/Public - ''; - in '' - /media file:${mapConf} - ''; - }; + systemd.automounts = [ + { where = "/media/odin"; } + { where = "/media/dellingr"; } + { where = "/media/vali"; } + ]; + + 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"; + type = "vfat"; + } + { + what = "//VALI/Public"; + where = "/media/vali"; + type = "cifs"; + options = "guest"; + } + ]; systemd.globalEnvironment = { JACK_PROMISCUOUS_SERVER = "1"; -- cgit v1.2.3