From dfac12a8640d7be188bed1a95be545433c54c92f Mon Sep 17 00:00:00 2001 From: cinereal Date: Mon, 11 Aug 2025 15:18:37 +0200 Subject: [PATCH] mv executable --- lib.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib.nix b/lib.nix index e8b36fe..090b456 100644 --- a/lib.nix +++ b/lib.nix @@ -12,7 +12,7 @@ text, outPath, owner ? "root", - group ? "", + group ? owner, mode ? "0400", }: pkgs.runCommand name { @@ -20,6 +20,8 @@ script = '' #!/bin/sh ${nix_templater}/bin/nix_templater ${builtins.placeholder "out"}/template ${builtins.placeholder "nix_template"} "${outPath}" + chown ${owner}:${group} "${outPath}" + chmod ${mode} "${outPath}" ''; passAsFile = [ "script" "textBeforeTemplate" ]; } '' @@ -27,7 +29,5 @@ cp $textBeforeTemplatePath $out/template cp $scriptPath $out/bin/${name} chmod +x $out/bin/${name} - chown ${owner}:${group} $out/bin/${name} - chmod ${mode} $out/bin/${name} ''; }