summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-06-07 13:06:58 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-06-07 13:06:58 +0200
commit51e93edfce6096ce6d71e6942f4547c2e4f61981 (patch)
treee5667ab6006e9c95b35f2054af2ea018a31e81f0
parente9ba21ce59be526964dc156c2af21d507ab758ac (diff)
downloadnixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar
nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar.gz
nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar.bz2
nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar.xz
nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.zip
Switched /srv/media to autofs (hopefully)
-rw-r--r--bragi.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/bragi.nix b/bragi.nix
index 40ad52e5..cee70e36 100644
--- a/bragi.nix
+++ b/bragi.nix
@@ -43,6 +43,17 @@
43 ''; 43 '';
44 }; 44 };
45 45
46 services.autofs = {
47 enable = true;
48 autoMaster = let
49 mapConf = pkgs.writeText "auto" '''
50 odin -fstype=nfs,ro odin.asgard.yggdrasil:/srv/media
51 ''';
52 in '''
53 /media file:''${mapConf}
54 ''';
55 };
56
46 users.extraUsers.guest = { 57 users.extraUsers.guest = {
47 name = "gkleen"; 58 name = "gkleen";
48 isNormalUser = true; 59 isNormalUser = true;
@@ -57,10 +68,4 @@
57 }; 68 };
58 69
59 security.setuidPrograms = ["mount.nfs"]; 70 security.setuidPrograms = ["mount.nfs"];
60
61 fileSystems."/media/odin" = {
62 device = "odin.asgard.yggdrasil:/srv/media";
63 fsType = "nfs";
64 options = "noauto,nofail,users";
65 };
66} 71}