diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-25 01:52:49 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-25 01:52:49 +0900 |
| commit | 5c4058d5ac7e7944973ca8216c258fc50c194e22 (patch) | |
| tree | c06597903233c75eca5a1edae8b06d93f0f81774 /nixos.nix | |
| parent | e732dca7629edb503df0c65df5f37a99600d567d (diff) | |
app: run in native sandbox
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'nixos.nix')
| -rw-r--r-- | nixos.nix | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -86,12 +86,11 @@ in enablements = with app.capability; (if wayland then 1 else 0) + (if x11 then 2 else 0) + (if dbus then 4 else 0) + (if pulse then 8 else 0); conf = { inherit (app) id; - command = [ - (pkgs.writeScript "${app.name}-start" '' - #!${pkgs.zsh}${pkgs.zsh.shellPath} - ${script} - '') - ]; + path = pkgs.writeScript "${app.name}-start" '' + #!${pkgs.zsh}${pkgs.zsh.shellPath} + ${script} + ''; + args = [ "${app.name}-start" ]; confinement = { app_id = aid; inherit (app) groups; @@ -99,17 +98,15 @@ in home = getsubhome fid aid; sandbox = { inherit (app) + devel userns net dev + tty + multiarch env ; - syscall = { - inherit (app) compat multiarch bluetooth; - deny_devel = !app.devel; - }; map_real_uid = app.mapRealUid; - no_new_session = app.tty; direct_wayland = app.insecureWayland; filesystem = let @@ -149,7 +146,7 @@ in ] ++ app.extraPaths; auto_etc = true; - override = [ "/var/run/nscd" ]; + cover = [ "/var/run/nscd" ]; }; inherit enablements; inherit (dbusConfig) session_bus system_bus; |
