-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshares.nix
More file actions
39 lines (35 loc) · 794 Bytes
/
Copy pathshares.nix
File metadata and controls
39 lines (35 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
config,
lib,
...
}:
with lib;
let
cfg = config.hosts.shares;
in
{
options.hosts.shares = {
enable = mkEnableOption "Shares";
};
config = mkIf cfg.enable {
fileSystems."/export/music" = {
device = "/mnt/zwembad/music";
fsType = "nfs";
options = [ "bind" ];
};
fileSystems."/export/share" = {
device = "/mnt/zwembad/share";
fsType = "nfs";
options = [ "bind" ];
};
boot.supportedFilesystems = [ "nfs" ];
services.nfs.server = {
enable = true;
exports = ''
/export 100.64.0.0/10(rw,fsid=0,no_subtree_check)
/export/music 100.64.0.0/10(rw,nohide,insecure,no_subtree_check)
/export/share 100.64.0.0/10(rw,nohide,insecure,no_subtree_check)
'';
};
};
}