workstation perf tweaks
This commit is contained in:
parent
349cdd047d
commit
e70c974289
5 changed files with 325 additions and 288 deletions
|
|
@ -39,8 +39,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [ "https://niri.cachix.org" ];
|
extra-substituters = ["https://niri.cachix.org"];
|
||||||
extra-trusted-public-keys = [ "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" ];
|
extra-trusted-public-keys = ["niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="];
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ in {
|
||||||
package = pkgs.niri-unstable;
|
package = pkgs.niri-unstable;
|
||||||
settings = {
|
settings = {
|
||||||
window-rules = [
|
window-rules = [
|
||||||
{ draw-border-with-background = false; }
|
{draw-border-with-background = false;}
|
||||||
];
|
];
|
||||||
prefer-no-csd = true;
|
prefer-no-csd = true;
|
||||||
xwayland-satellite = {
|
xwayland-satellite = {
|
||||||
|
|
@ -97,7 +97,7 @@ in {
|
||||||
path = lib.getExe pkgs.xwayland-satellite-unstable;
|
path = lib.getExe pkgs.xwayland-satellite-unstable;
|
||||||
};
|
};
|
||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
{ argv = ["noctalia-shell"]; }
|
{argv = ["noctalia-shell"];}
|
||||||
];
|
];
|
||||||
clipboard.disable-primary = true;
|
clipboard.disable-primary = true;
|
||||||
input = {
|
input = {
|
||||||
|
|
@ -107,7 +107,8 @@ in {
|
||||||
natural-scroll = false;
|
natural-scroll = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
binds = {
|
binds =
|
||||||
|
{
|
||||||
"Mod+Return".action.spawn = "${config.programs.foot.package}/bin/foot";
|
"Mod+Return".action.spawn = "${config.programs.foot.package}/bin/foot";
|
||||||
"Mod+q".action = config.lib.niri.actions.close-window;
|
"Mod+q".action = config.lib.niri.actions.close-window;
|
||||||
# "$mod, F, fullscreen, 0"
|
# "$mod, F, fullscreen, 0"
|
||||||
|
|
@ -218,18 +219,26 @@ in {
|
||||||
// (
|
// (
|
||||||
# workspaces
|
# workspaces
|
||||||
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
||||||
lib.listToAttrs (builtins.concatLists (builtins.genList (
|
lib.listToAttrs (
|
||||||
|
builtins.concatLists (builtins.genList (
|
||||||
i: let
|
i: let
|
||||||
ws = i + 1;
|
ws = i + 1;
|
||||||
in [
|
in [
|
||||||
{ name = "Mod+${toString i}"; value = { action.focus-workspace = i; }; }
|
{
|
||||||
{ name = "Mod+Shift+${toString i}"; value = { action.move-window-to-workspace = i; }; }
|
name = "Mod+${toString i}";
|
||||||
|
value = {action.focus-workspace = i;};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Mod+Shift+${toString i}";
|
||||||
|
value = {action.move-window-to-workspace = i;};
|
||||||
|
}
|
||||||
# "$mod, code:1${toString i}, workspace, ${toString ws}"
|
# "$mod, code:1${toString i}, workspace, ${toString ws}"
|
||||||
# "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
# "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
9)
|
9)
|
||||||
));
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ in {
|
||||||
zip
|
zip
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs =
|
||||||
|
{
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
|
|
||||||
zed-editor = {
|
zed-editor = {
|
||||||
|
|
@ -29,7 +30,7 @@ in {
|
||||||
"elm"
|
"elm"
|
||||||
"nix"
|
"nix"
|
||||||
];
|
];
|
||||||
extraPackages = with pkgs; [ package-version-server ];
|
extraPackages = with pkgs; [package-version-server];
|
||||||
userKeymaps = [
|
userKeymaps = [
|
||||||
{
|
{
|
||||||
context = "vim_mode == normal";
|
context = "vim_mode == normal";
|
||||||
|
|
@ -143,7 +144,8 @@ in {
|
||||||
ignores = [".envrc"];
|
ignores = [".envrc"];
|
||||||
extraConfig.push.autoSetupRemote = true;
|
extraConfig.push.autoSetupRemote = true;
|
||||||
};
|
};
|
||||||
} // (lib.optionalAttrs (options.programs ? nixcord) {
|
}
|
||||||
|
// (lib.optionalAttrs (options.programs ? nixcord) {
|
||||||
nixcord = {
|
nixcord = {
|
||||||
package = pkgs.vencord;
|
package = pkgs.vencord;
|
||||||
|
|
||||||
|
|
@ -221,9 +223,6 @@ in {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
FZF_DEFAULT_COMMAND = "${pkgs.fd}/bin/fd --type f";
|
FZF_DEFAULT_COMMAND = "${pkgs.fd}/bin/fd --type f";
|
||||||
};
|
};
|
||||||
|
|
@ -232,5 +231,4 @@ in {
|
||||||
ext_tabline=false
|
ext_tabline=false
|
||||||
ext_popupmenu=false
|
ext_popupmenu=false
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,12 +96,20 @@ in {
|
||||||
|
|
||||||
wireplumber.extraConfig."99-alsa-lowlatency"."alsa_monitor.rules" = [
|
wireplumber.extraConfig."99-alsa-lowlatency"."alsa_monitor.rules" = [
|
||||||
{
|
{
|
||||||
matches = [ { "node.name" = "matches:alsa_output.*"; } ];
|
matches = [{"node.name" = "matches:alsa_output.*";}];
|
||||||
apply_properties = {
|
apply_properties = {
|
||||||
"audio.format" = "S32LE";
|
"audio.format" = "S32LE";
|
||||||
"audio.rate" = toString (cfg.rate * (if cfg.usbSoundcard then 2 else 1)); # for USB soundcards it should be twice your desired rate
|
"audio.rate" = toString (cfg.rate
|
||||||
|
* (
|
||||||
|
if cfg.usbSoundcard
|
||||||
|
then 2
|
||||||
|
else 1
|
||||||
|
)); # for USB soundcards it should be twice your desired rate
|
||||||
"api.alsa.period-size" = toString cfg.periodSize; # defaults to 1024, tweak by trial-and-error
|
"api.alsa.period-size" = toString cfg.periodSize; # defaults to 1024, tweak by trial-and-error
|
||||||
"api.alsa.disable-batch" = if cfg.batch then "false" else "true"; # generally, USB soundcards use the batch mode
|
"api.alsa.disable-batch" =
|
||||||
|
if cfg.batch
|
||||||
|
then "false"
|
||||||
|
else "true"; # generally, USB soundcards use the batch mode
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,30 @@ in {
|
||||||
|
|
||||||
# Make battery usage and performance sane
|
# Make battery usage and performance sane
|
||||||
# hardware.system76.power-daemon.enable = lib.mkDefault true;
|
# hardware.system76.power-daemon.enable = lib.mkDefault true;
|
||||||
|
zramSwap.enable = true;
|
||||||
services.tlp.enable = false;
|
services.tlp.enable = false;
|
||||||
services.power-profiles-daemon.enable = lib.mkDefault false;
|
services.power-profiles-daemon.enable = lib.mkDefault false;
|
||||||
services.system76-scheduler.enable = lib.mkDefault true;
|
services.system76-scheduler = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
exceptions = lib.mkDefault [
|
||||||
|
"include descends=\"schedtool\""
|
||||||
|
"include descends=\"nice\""
|
||||||
|
"include descends=\"chrt\""
|
||||||
|
"include descends=\"taskset\""
|
||||||
|
"include descends=\"ionice\""
|
||||||
|
|
||||||
|
"schedtool"
|
||||||
|
"nice"
|
||||||
|
"chrt"
|
||||||
|
"ionice"
|
||||||
|
|
||||||
|
"dbus"
|
||||||
|
"dbus-broker"
|
||||||
|
"rtkit-daemon"
|
||||||
|
"taskset"
|
||||||
|
"systemd"
|
||||||
|
];
|
||||||
|
};
|
||||||
services.tuned = {
|
services.tuned = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
settings.dynamic_tuning = lib.mkDefault true;
|
settings.dynamic_tuning = lib.mkDefault true;
|
||||||
|
|
@ -153,6 +174,7 @@ in {
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"adbusers" # run ADB commands
|
"adbusers" # run ADB commands
|
||||||
"audio" # soundcard access
|
"audio" # soundcard access
|
||||||
|
"rtkit" # realtime stuff?
|
||||||
"video" # webcam access (and maybe wayland too?)
|
"video" # webcam access (and maybe wayland too?)
|
||||||
"libvirtd" # run VMs through libvirt
|
"libvirtd" # run VMs through libvirt
|
||||||
"kvm" # run KVM VMs
|
"kvm" # run KVM VMs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue