This commit is contained in:
Rachel Lambda Samuelsson 2024-03-18 15:59:56 +01:00
parent ed1b7dc0a5
commit 2d114632c2
2 changed files with 35 additions and 1 deletions

View File

@ -157,6 +157,29 @@ in rec {
initExtra = ''
source ~/.profile
set -o vi
norm_name() {
ret="$1"
[ "$ret" = "''${ret#*\#}" ] && ret="nixpkgs#$ret"
printf '%s\n' "$ret"
}
run() {
prog="$1"
shift
nix run "$(norm_name $prog)" "$@"
}
shell() {
i=0
while [ $i -lt $# ]; do
prog="$1"
shift
set -- "$@" "$(norm_name $prog)"
: $(( i++ ))
done
nix shell "$@"
}
'';
};
@ -527,6 +550,16 @@ in rec {
};
};
};
autorandr = {
enable = true;
hooks.postswitch = {
wall = "xwallpaper --zoom \"$HOME\"/img/wallpaper";
bar = "systemctl restart --user polybar";
};
profiles = {
};
};
};
services = {
@ -600,6 +633,7 @@ in rec {
blueman-applet.enable = true;
betterlockscreen.enable = true;
gnome-keyring.enable = true;
autorandr.enable = true;
};

View File

@ -36,7 +36,7 @@
DISK_IDLE_SECS_ON_BAT = 5;
MAX_LOST_WORK_SECS_ON_AC = 15;
MAX_LOST_WORK_SECS_ON_BAT = 120;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_AC = "auto";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_SCALING_MIN_FREQ_ON_AC = 400000;
CPU_SCALING_MAX_FREQ_ON_AC = 4700000;