add nicer + tmuxbash
This commit is contained in:
28
pkgs/nicer.nix
Normal file
28
pkgs/nicer.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
coreutils,
|
||||
writeShellApplication,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "nicer";
|
||||
text = ''
|
||||
f=$(${coreutils}/bin/mktemp)
|
||||
trap '${coreutils}/bin/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 \
|
||||
-- "$@"
|
||||
'';
|
||||
}
|
||||
13
pkgs/tmuxbash.nix
Normal file
13
pkgs/tmuxbash.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
tmux,
|
||||
bash,
|
||||
writeShellApplication,
|
||||
...
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "tmuxbash";
|
||||
text = ''
|
||||
${tmux}/bin/tmux
|
||||
${bash}/bin/bash
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user