nix: pass $SHELL for shell interpreter

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
Ophestra Umiker 2024-10-12 23:01:06 +09:00
parent d37dcff2fc
commit b9d5fe49cb
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
1 changed files with 8 additions and 16 deletions

View File

@ -199,14 +199,6 @@ in
description = "Privileged user account."; 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 { stateDir = mkOption {
type = types.str; type = types.str;
description = '' description = ''
@ -242,14 +234,14 @@ in
else else
null; null;
capArgs = capArgs =
(if wayland then " -wayland" else "") (if wayland then " --wayland" else "")
+ (if x11 then " -X" else "") + (if x11 then " -X" else "")
+ (if dbus then " -dbus" else "") + (if dbus then " --dbus" else "")
+ (if pulse then " -pulse" else "") + (if pulse then " --pulse" else "")
+ (if launcher.dbus.mpris then " -mpris" else "") + (if launcher.dbus.mpris then " --mpris" else "")
+ (if launcher.dbus.id != null then " -dbus-id ${launcher.dbus.id}" else "") + (if launcher.dbus.id != null then " --dbus-id ${launcher.dbus.id}" else "")
+ (if dbusConfig != null then " -dbus-config ${dbusConfig}" else "") + (if dbusConfig != null then " --dbus-config ${dbusConfig}" else "")
+ (if dbusSystem != null then " -dbus-system ${dbusSystem}" else ""); + (if dbusSystem != null then " --dbus-system ${dbusSystem}" else "");
in in
pkgs.writeShellScriptBin name ( pkgs.writeShellScriptBin name (
if launcher.method == "simple" then if launcher.method == "simple" then
@ -258,7 +250,7 @@ in
'' ''
else 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; ) launchers;