summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2019-12-23 16:51:29 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2019-12-23 16:51:29 +0100
commitfb3ac99b7740d2e98116ad5acde0b09427791d03 (patch)
treea84626485b264026a669ba682db6ba5269859dac /custom
parent3946f8b248d9235d9a4379e9889cd5b0ed464156 (diff)
downloadnixos-fb3ac99b7740d2e98116ad5acde0b09427791d03.tar
nixos-fb3ac99b7740d2e98116ad5acde0b09427791d03.tar.gz
nixos-fb3ac99b7740d2e98116ad5acde0b09427791d03.tar.bz2
nixos-fb3ac99b7740d2e98116ad5acde0b09427791d03.tar.xz
nixos-fb3ac99b7740d2e98116ad5acde0b09427791d03.zip
...
Diffstat (limited to 'custom')
-rw-r--r--custom/uucp.nix28
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: {