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