tangled
alpha
login
or
join now
encode42.dev
/
nixos
0
fork
atom
Personal-use NixOS configuration
0
fork
atom
overview
issues
pulls
pipelines
Minor tweaks to mkShares function
encode42.dev
3 months ago
a3c9f37e
b8e4f8ca
+14
-3
2 changed files
expand all
collapse all
unified
split
hosts
index
config
nfs.nix
lib
mkShares.nix
+10
-2
hosts/index/config/nfs.nix
···
25
25
26
26
shares = [
27
27
{
28
28
-
name = "torrents";
28
28
+
name = "Torrents";
29
29
30
30
path = "/mnt/data/rtorrent/downloads";
31
31
···
33
33
groupName = mediaGroupName;
34
34
}
35
35
{
36
36
-
name = "soulseek";
36
36
+
name = "Soulseek";
37
37
38
38
path = "/mnt/data/soulseek/downloads";
39
39
40
40
userName = config.services.slskd.user;
41
41
groupName = mediaGroupName;
42
42
}
43
43
+
# {
44
44
+
# name = "Rips";
45
45
+
46
46
+
# path = "/mnt/data/rips";
47
47
+
48
48
+
# userName = "encode42";
49
49
+
# groupName = mediaGroupName;
50
50
+
# }
43
51
{
44
52
path = "/mnt/data/media/Music";
45
53
+4
-1
lib/mkShares.nix
···
23
23
24
24
user = config.users.users.${target.userName};
25
25
group = config.users.groups.${target.groupName or user.group};
26
26
+
27
27
+
userId = toString user.uid;
28
28
+
groupId = toString (group.gid or user.gid);
26
29
in
27
30
{
28
31
inherit exportPath;
···
36
39
};
37
40
38
41
nfsExport = ''
39
39
-
"${exportPath}" *(rw,insecure,async,no_subtree_check,nohide,all_squash,anonuid=${toString user.uid},anongid=${toString group.gid})
42
42
+
"${exportPath}" *(rw,insecure,async,no_subtree_check,nohide,all_squash,anonuid=${userId},anongid=${groupId})
40
43
'';
41
44
};
42
45