From b9d5fe49cbb2878add16f47c4660bcb3d8144d1b Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sat, 12 Oct 2024 23:01:06 +0900 Subject: [PATCH] nix: pass $SHELL for shell interpreter Signed-off-by: Ophestra Umiker --- nixos.nix | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/nixos.nix b/nixos.nix index f11e86a..c04dca7 100644 --- a/nixos.nix +++ b/nixos.nix @@ -199,14 +199,6 @@ in description = "Privileged user account."; }; - shell = mkOption { - type = types.str; - description = '' - Shell set up to source home-manager for the privileged user. - Required for setting up the environment of sandboxed programs. - ''; - }; - stateDir = mkOption { type = types.str; description = '' @@ -242,14 +234,14 @@ in else null; capArgs = - (if wayland then " -wayland" else "") + (if wayland then " --wayland" else "") + (if x11 then " -X" else "") - + (if dbus then " -dbus" else "") - + (if pulse then " -pulse" else "") - + (if launcher.dbus.mpris then " -mpris" else "") - + (if launcher.dbus.id != null then " -dbus-id ${launcher.dbus.id}" else "") - + (if dbusConfig != null then " -dbus-config ${dbusConfig}" else "") - + (if dbusSystem != null then " -dbus-system ${dbusSystem}" else ""); + + (if dbus then " --dbus" else "") + + (if pulse then " --pulse" else "") + + (if launcher.dbus.mpris then " --mpris" else "") + + (if launcher.dbus.id != null then " --dbus-id ${launcher.dbus.id}" else "") + + (if dbusConfig != null then " --dbus-config ${dbusConfig}" else "") + + (if dbusSystem != null then " --dbus-system ${dbusSystem}" else ""); in pkgs.writeShellScriptBin name ( if launcher.method == "simple" then @@ -258,7 +250,7 @@ in '' else '' - exec fortify${capArgs} -method ${launcher.method} -u ${user} ${cfg.shell} -c "exec ${command} $@" + exec fortify${capArgs} --method ${launcher.method} -u ${user} $SHELL -c "exec ${command} $@" '' ) ) launchers;