aboutsummaryrefslogtreecommitdiffhomepage
path: root/nixos.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-27 01:08:53 +0900
committerOphestra <cat@gensokyo.uk>2025-03-27 03:04:46 +0900
commit32c90ef4e737f25f57cfa9f493c9cd7f6950c508 (patch)
treeffae5e9d0dbdabf782663fcbbfc9388858a0b83a /nixos.nix
parent2a4e2724a35f322af3ae26c637c74161c4884542 (diff)
nix: pass through exec arguments
This is useful for when a wrapper script is unnecessary. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'nixos.nix')
-rw-r--r--nixos.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/nixos.nix b/nixos.nix
index 8cb58721..ae555169 100644
--- a/nixos.nix
+++ b/nixos.nix
@@ -88,11 +88,15 @@ in
conf = {
inherit (app) id;
- path = pkgs.writeScript "${app.name}-start" ''
- #!${pkgs.zsh}${pkgs.zsh.shellPath}
- ${script}
- '';
- args = [ "${app.name}-start" ];
+ path =
+ if app.path == null then
+ pkgs.writeScript "${app.name}-start" ''
+ #!${pkgs.zsh}${pkgs.zsh.shellPath}
+ ${script}
+ ''
+ else
+ app.path;
+ args = if app.args == null then [ "${app.name}-start" ] else app.args;
confinement = {
app_id = aid;