diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-07 13:06:58 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-07 13:06:58 +0200 |
commit | 51e93edfce6096ce6d71e6942f4547c2e4f61981 (patch) | |
tree | e5667ab6006e9c95b35f2054af2ea018a31e81f0 /bragi.nix | |
parent | e9ba21ce59be526964dc156c2af21d507ab758ac (diff) | |
download | nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar.gz nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar.bz2 nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.tar.xz nixos-51e93edfce6096ce6d71e6942f4547c2e4f61981.zip |
Switched /srv/media to autofs (hopefully)
Diffstat (limited to 'bragi.nix')
-rw-r--r-- | bragi.nix | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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 | } |