nix: pass $SHELL for shell interpreter
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
d37dcff2fc
commit
b9d5fe49cb
24
nixos.nix
24
nixos.nix
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue