diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2019-12-23 16:37:47 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2019-12-23 16:37:47 +0100 |
commit | 5dd167ee5ff71b20294e78a66d374e4308f3d767 (patch) | |
tree | 4ee3b8a2e9294b4babf793ab50ece47ffa2efeac | |
parent | c7ddeaf86a65037a1e74c26cb68c61ee0206f13d (diff) | |
download | nixos-5dd167ee5ff71b20294e78a66d374e4308f3d767.tar nixos-5dd167ee5ff71b20294e78a66d374e4308f3d767.tar.gz nixos-5dd167ee5ff71b20294e78a66d374e4308f3d767.tar.bz2 nixos-5dd167ee5ff71b20294e78a66d374e4308f3d767.tar.xz nixos-5dd167ee5ff71b20294e78a66d374e4308f3d767.zip |
...
-rw-r--r-- | custom/uucp.nix | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix index 02c9cb87..af87231a 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix | |||
@@ -39,9 +39,6 @@ let | |||
39 | chat = pkgs.writeScript "chat" '' | 39 | chat = pkgs.writeScript "chat" '' |
40 | #!${pkgs.stdenv.shell} | 40 | #!${pkgs.stdenv.shell} |
41 | 41 | ||
42 | ${pkgs.utillinux}/bin/ionice -c 3 -p $$ | ||
43 | ${pkgs.utillinux}/bin/renice -n 15 -p $$ | ||
44 | |||
45 | echo . | 42 | echo . |
46 | exec ${config.security.wrapperDir}/uucico | 43 | exec ${config.security.wrapperDir}/uucico |
47 | ''; | 44 | ''; |
@@ -306,7 +303,21 @@ in { | |||
306 | setgid = false; | 303 | setgid = false; |
307 | }; | 304 | }; |
308 | }; | 305 | }; |
309 | in listToAttrs (map wrapper ["uucico" "uuxqt" "cu" "uucp" "uuname" "uustat" "uux"]); | 306 | in listToAttrs (map wrapper ["uuxqt" "cu" "uucp" "uuname" "uustat" "uux"]); |
307 | security.wrappers.uucico = { | ||
308 | source = pkgs.writeScript '' | ||
309 | #!${pkgs.stdenv.shell} | ||
310 | |||
311 | ${pkgs.utillinux}/bin/renice -n 15 -p $$ | ||
312 | ${pkgs.utillinux}/bin/ionice -c 3 -p $$ | ||
313 | |||
314 | exec ${pkgs.uucp}/bin/uucico $@ | ||
315 | ''; | ||
316 | owner = "root"; | ||
317 | group = "root"; | ||
318 | setuid = true; | ||
319 | setgid = false; | ||
320 | }; | ||
310 | 321 | ||
311 | nixpkgs.overlays = [(self: super: { | 322 | nixpkgs.overlays = [(self: super: { |
312 | uucp = super.stdenv.lib.overrideDerivation super.uucp (oldAttrs: { | 323 | uucp = super.stdenv.lib.overrideDerivation super.uucp (oldAttrs: { |
@@ -357,8 +368,6 @@ in { | |||
357 | User = "uucp"; | 368 | User = "uucp"; |
358 | Type = "oneshot"; | 369 | Type = "oneshot"; |
359 | ExecStart = "${config.security.wrapperDir}/uucico -D -S %i"; | 370 | ExecStart = "${config.security.wrapperDir}/uucico -D -S %i"; |
360 | Nice = 15; | ||
361 | IOSchedulingClass = "idle"; | ||
362 | }; | 371 | }; |
363 | }; | 372 | }; |
364 | 373 | ||