diff options
-rw-r--r-- | custom/uucp.nix | 28 |
1 files changed, 19 insertions, 9 deletions
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 { | |||
296 | security.wrappers = let | 296 | security.wrappers = let |
297 | wrapper = p: { name = p; | 297 | wrapper = p: { name = p; |
298 | value = { | 298 | value = { |
299 | source = pkgs.writeScript ''${p}-nice'' '' | 299 | source = "${pkgs.uucp}/bin/${p}"; |
300 | #!${pkgs.stdenv.shell} | ||
301 | |||
302 | ${pkgs.utillinux}/bin/renice -n 15 -p $$ | ||
303 | ${pkgs.utillinux}/bin/ionice -c 3 -p $$ | ||
304 | |||
305 | exec ${pkgs.uucp}/bin/${p} $@ | ||
306 | ''; | ||
307 | owner = "root"; | 300 | owner = "root"; |
308 | group = "root"; | 301 | group = "root"; |
309 | setuid = true; | 302 | setuid = true; |
310 | setgid = false; | 303 | setgid = false; |
311 | }; | 304 | }; |
312 | }; | 305 | }; |
313 | in listToAttrs (map wrapper ["uucico" "uuxqt" "cu" "uucp" "uuname" "uustat" "uux"]); | 306 | niceWrapper = p: { |
307 | name = p; | ||
308 | value = { | ||
309 | source = pkgs.writeScript "${p}-nice" '' | ||
310 | #!${pkgs.stdenv.shell} | ||
311 | |||
312 | ${pkgs.utillinux}/bin/renice -n 15 -p $$ | ||
313 | ${pkgs.utillinux}/bin/ionice -c 3 -p $$ | ||
314 | |||
315 | exec ${pkgs.uucp}/bin/${p} $@ | ||
316 | ''; | ||
317 | owner = "root"; | ||
318 | group = "root"; | ||
319 | setuid = true; | ||
320 | setgid = false; | ||
321 | }; | ||
322 | }; | ||
323 | in listToAttrs (map wrapper ["uucico" "cu" "uucp" "uuname" "uustat"]) // listToAttrs (map niceWrapper ["uux" "uuxqt"]); | ||
314 | 324 | ||
315 | nixpkgs.overlays = [(self: super: { | 325 | nixpkgs.overlays = [(self: super: { |
316 | uucp = super.stdenv.lib.overrideDerivation super.uucp (oldAttrs: { | 326 | uucp = super.stdenv.lib.overrideDerivation super.uucp (oldAttrs: { |