diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-12 22:55:53 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-12 22:55:53 +0900 |
| commit | d37dcff2fcb7639abd3ffbfc420546791511b17d (patch) | |
| tree | 74041f937fa62aaadfc66c442166b2b353d837a6 | |
| parent | 805ef99f9bf75189c512401ee5b92942be66342b (diff) | |
app/seal: allow GPU access in permissive default when either X11/Wayland is enabled
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
| -rw-r--r-- | internal/app/seal.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/app/seal.go b/internal/app/seal.go index ad16663f..4a211dba 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -158,6 +158,10 @@ func (a *app) Seal(config *Config) error { } conf.Filesystem = append(conf.Filesystem, b...) } + // bind GPU stuff + if config.Confinement.Enablements.Has(state.EnableX) || config.Confinement.Enablements.Has(state.EnableWayland) { + conf.Filesystem = append(conf.Filesystem, &FilesystemConfig{Src: "/dev/dri", Device: true}) + } config.Confinement.Sandbox = conf } seal.sys.bwrap = config.Confinement.Sandbox.Bwrap() |
