@@ -76,10 +76,14 @@ def __init__(self, name):
76
76
lib .utils .chronic (['systemd-nspawn' , '--version' ]).stdout .splitlines ()[0 ].split ()[1 ])
77
77
78
78
def _add_dynamic_mounts (self ):
79
- rw_mounts = {
80
- '/dev/kvm' ,
79
+ automounted_mounts = {
81
80
# We may be in a virtual machine
82
81
os .environ ['HOST_FOLDER' ],
82
+ os .environ ['NAS_FOLDER' ],
83
+ }
84
+ rw_mounts = {
85
+ '/dev/kvm' ,
86
+ * automounted_mounts ,
83
87
os .environ ['NVME_FOLDER' ],
84
88
# Allow 'fzf --tmux' to work properly
85
89
'/var/tmp/fzf' ,
@@ -116,10 +120,10 @@ def _add_dynamic_mounts(self):
116
120
# which needs to be written to as the host root user by the
117
121
# container root user. For mounts where the current user can read
118
122
# and write to, the mapping mentioned earlier makes everything work
119
- # as expeced without 'idmap'. We special case HOST_FOLDER because
120
- # the os.access check may not pass if the folder has not been
121
- # automounted yet.
122
- if mount == os . environ [ 'HOST_FOLDER' ] or os .access (mount , os .R_OK | os .W_OK ):
123
+ # as expeced without 'idmap'. We special case automounted mounts
124
+ # because the os.access check may not pass if the folder has not
125
+ # been automounted yet.
126
+ if mount in automounted_mounts or os .access (mount , os .R_OK | os .W_OK ):
123
127
item = mount
124
128
else :
125
129
item = f"{ mount } :{ mount } :idmap"
0 commit comments