diff --git a/shared/home/default.nix b/shared/home/default.nix index 3e81abb..6f1639a 100644 --- a/shared/home/default.nix +++ b/shared/home/default.nix @@ -20,6 +20,31 @@ go zig ]) + (writeShellApplication { + name = "nicer"; + text = '' + set -e + f=$(${coreutils}/bin/mktemp) + trap 'rm -f "$f"' EXIT + ${coreutils}/bin/env > "$f" + systemd-run \ + --user \ + --same-dir \ + --slice nicer \ + --nice=19 \ + --property CPUSchedulingPolicy=idle \ + --property IOSchedulingClass=idle \ + --property IOSchedulingPriority=7 \ + --pty \ + --pipe \ + --wait \ + --collect \ + --quiet \ + --property EnvironmentFile="$f" \ + --service-type=exec \ + -- "$@" + ''; + }) (lib.mkIf hmOnly [ pkgs.nixgl.nixGLIntel ncdu