diff options
Diffstat (limited to 'hst')
| -rw-r--r-- | hst/config.go | 10 | ||||
| -rw-r--r-- | hst/hst.go | 5 | ||||
| -rw-r--r-- | hst/hst_test.go | 18 |
3 files changed, 10 insertions, 23 deletions
diff --git a/hst/config.go b/hst/config.go index 8f17de97..7ee25878 100644 --- a/hst/config.go +++ b/hst/config.go @@ -96,16 +96,6 @@ type ( // container mount points; // if the first element targets /, it is inserted early and excluded from path hiding Filesystem []FilesystemConfigJSON `json:"filesystem"` - // create symlinks inside container filesystem - Link []LinkConfig `json:"symlink"` - } - - LinkConfig struct { - // symlink target in container - Target *container.Absolute `json:"target"` - // linkname the symlink points to; - // prepend '*' to dereference an absolute pathname on host - Linkname string `json:"linkname"` } ) @@ -107,13 +107,12 @@ func Template() *Config { Work: container.MustAbs("/mnt-root/nix/.rw-store/work"), }}, {&FSBind{Source: container.MustAbs("/nix/store")}}, - {&FSBind{Source: container.AbsFHSRun.Append("current-system")}}, - {&FSBind{Source: container.AbsFHSRun.Append("opengl-driver")}}, + {&FSLink{Target: container.AbsFHSRun.Append("current-system"), Linkname: "/run/current-system", Dereference: true}}, + {&FSLink{Target: container.AbsFHSRun.Append("opengl-driver"), Linkname: "/run/opengl-driver", Dereference: true}}, {&FSBind{Source: container.AbsFHSVarLib.Append("hakurei/u0/org.chromium.Chromium"), Target: container.MustAbs("/data/data/org.chromium.Chromium"), Write: true}}, {&FSBind{Source: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}}, }, - Link: []LinkConfig{{container.AbsFHSRunUser.Append("65534"), container.FHSRunUser + "150"}}, }, } } diff --git a/hst/hst_test.go b/hst/hst_test.go index 553533b0..fec189a9 100644 --- a/hst/hst_test.go +++ b/hst/hst_test.go @@ -135,12 +135,16 @@ func TestTemplate(t *testing.T) { "src": "/nix/store" }, { - "type": "bind", - "src": "/run/current-system" + "type": "link", + "dst": "/run/current-system", + "linkname": "/run/current-system", + "dereference": true }, { - "type": "bind", - "src": "/run/opengl-driver" + "type": "link", + "dst": "/run/opengl-driver", + "linkname": "/run/opengl-driver", + "dereference": true }, { "type": "bind", @@ -154,12 +158,6 @@ func TestTemplate(t *testing.T) { "dev": true, "optional": true } - ], - "symlink": [ - { - "target": "/run/user/65534", - "linkname": "/run/user/150" - } ] } }` |
