From fb3ac99b7740d2e98116ad5acde0b09427791d03 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 23 Dec 2019 16:51:29 +0100 Subject: ... --- custom/uucp.nix | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'custom') diff --git a/custom/uucp.nix b/custom/uucp.nix index 2b43d207..5d6ad0b6 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix @@ -296,21 +296,31 @@ in { security.wrappers = let wrapper = p: { name = p; value = { - source = pkgs.writeScript ''${p}-nice'' '' - #!${pkgs.stdenv.shell} - - ${pkgs.utillinux}/bin/renice -n 15 -p $$ - ${pkgs.utillinux}/bin/ionice -c 3 -p $$ - - exec ${pkgs.uucp}/bin/${p} $@ - ''; + source = "${pkgs.uucp}/bin/${p}"; owner = "root"; group = "root"; setuid = true; setgid = false; }; }; - in listToAttrs (map wrapper ["uucico" "uuxqt" "cu" "uucp" "uuname" "uustat" "uux"]); + niceWrapper = p: { + name = p; + value = { + source = pkgs.writeScript "${p}-nice" '' + #!${pkgs.stdenv.shell} + + ${pkgs.utillinux}/bin/renice -n 15 -p $$ + ${pkgs.utillinux}/bin/ionice -c 3 -p $$ + + exec ${pkgs.uucp}/bin/${p} $@ + ''; + owner = "root"; + group = "root"; + setuid = true; + setgid = false; + }; + }; + in listToAttrs (map wrapper ["uucico" "cu" "uucp" "uuname" "uustat"]) // listToAttrs (map niceWrapper ["uux" "uuxqt"]); nixpkgs.overlays = [(self: super: { uucp = super.stdenv.lib.overrideDerivation super.uucp (oldAttrs: { -- cgit v1.2.3