diff options
Diffstat (limited to 'internal/app')
| -rw-r--r-- | internal/app/app_nixos_linux_test.go | 22 | ||||
| -rw-r--r-- | internal/app/seal_linux.go | 6 |
2 files changed, 14 insertions, 14 deletions
diff --git a/internal/app/app_nixos_linux_test.go b/internal/app/app_nixos_linux_test.go index d762ca0c..16ac2a23 100644 --- a/internal/app/app_nixos_linux_test.go +++ b/internal/app/app_nixos_linux_test.go @@ -29,17 +29,17 @@ var testCasesNixos = []sealTestCase{ Container: &hst.ContainerConfig{ Userns: true, Net: true, MapRealUID: true, Env: nil, AutoEtc: true, Filesystem: []hst.FilesystemConfigJSON{ - f(&hst.FSBind{Src: m("/bin")}), - f(&hst.FSBind{Src: m("/usr/bin/")}), - f(&hst.FSBind{Src: m("/nix/store")}), - f(&hst.FSBind{Src: m("/run/current-system")}), - f(&hst.FSBind{Src: m("/sys/block"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/bus"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/class"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/dev"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/devices"), Optional: true}), - f(&hst.FSBind{Src: m("/run/opengl-driver")}), - f(&hst.FSBind{Src: m("/dev/dri"), Device: true, Optional: true}), + f(&hst.FSBind{Source: m("/bin")}), + f(&hst.FSBind{Source: m("/usr/bin/")}), + f(&hst.FSBind{Source: m("/nix/store")}), + f(&hst.FSBind{Source: m("/run/current-system")}), + f(&hst.FSBind{Source: m("/sys/block"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/bus"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/class"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/dev"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/devices"), Optional: true}), + f(&hst.FSBind{Source: m("/run/opengl-driver")}), + f(&hst.FSBind{Source: m("/dev/dri"), Device: true, Optional: true}), }, }, SystemBus: &dbus.Config{ diff --git a/internal/app/seal_linux.go b/internal/app/seal_linux.go index d0a8a546..536bb6ad 100644 --- a/internal/app/seal_linux.go +++ b/internal/app/seal_linux.go @@ -248,15 +248,15 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co // bind GPU stuff if config.Enablements.Unwrap()&(system.EX11|system.EWayland) != 0 { - conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Src: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}}) + conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Source: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}}) } // opportunistically bind kvm - conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Src: container.AbsFHSDev.Append("kvm"), Device: true, Optional: true}}) + conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Source: container.AbsFHSDev.Append("kvm"), Device: true, Optional: true}}) // hide nscd from container if present nscd := container.AbsFHSVar.Append("run/nscd") if _, err := sys.Stat(nscd.String()); !errors.Is(err, fs.ErrNotExist) { - conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSEphemeral{Dst: nscd}}) + conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSEphemeral{Target: nscd}}) } config.Container = conf |
