aboutsummaryrefslogtreecommitdiffhomepage
path: root/nixos.nix
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-10-12 23:01:06 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-10-12 23:01:06 +0900
commitb9d5fe49cbb2878add16f47c4660bcb3d8144d1b (patch)
treedb5219f3e02c460ca4174bc8275404fabaee711f /nixos.nix
parentd37dcff2fcb7639abd3ffbfc420546791511b17d (diff)
nix: pass $SHELL for shell interpreter
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'nixos.nix')
-rw-r--r--nixos.nix24
1 files changed, 8 insertions, 16 deletions
diff --git a/nixos.nix b/nixos.nix
index f11e86ab..c04dca71 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;