perf: change offload to nvidia-offload

This commit is contained in:
DACHXY 2025-04-01 12:25:58 +08:00
parent 3ddbca3f7c
commit 67826a3658
17 changed files with 163 additions and 254 deletions

View file

@ -11,6 +11,7 @@ in
extraConfig = {
safe.directory = [ "/etc/nixos" ];
init.defaultBranch = "main";
pull.rebase = true;
};
};
}

View file

@ -1,7 +1,7 @@
{ mainMod, nvidia-offload-enabled }:
let
firefox = "firefox-nightly";
prefix = if nvidia-offload-enabled then "offload" else "";
prefix = if nvidia-offload-enabled then "nvidia-offload" else "";
browser = "${prefix} ${firefox}";
noOffloadBrowser = "${firefox} -P noOffload";
terminal = "${prefix} ghostty";

View file

@ -1,24 +1,24 @@
{
windowrule = [
"pseudo, fcitx"
"float, file_progress"
"float, confirm"
"float, dialog"
"float, download"
"float, notification"
"float, error"
"float, splash"
"float, confirmreset"
"pseudo, class:fcitx"
"float, class:file_progress"
"float, class:confirm"
"float, class:dialog"
"float, class:download"
"float, class:notification"
"float, class:error"
"float, class:splash"
"float, class:confirmreset"
"float, title:Open File"
"float, title:branchdialog"
"float, viewnior"
"float, pavucontrol-qt"
"float, pavucontrol"
"float, file-roller"
"fullscreen, wlogout"
"float, class:viewnior"
"float, class:pavucontrol-qt"
"float, class:pavucontrol"
"float, class:file-roller"
"fullscreen, title:wlogout"
"float, title:wlogout"
"fullscreen, title:wlogout"
"idleinhibit stayfocused, mpv"
"idleinhibit stayfocused, class:mpv"
];
windowrulev2 = [

View file

@ -32,16 +32,6 @@ let
song_info=$(playerctl metadata --format '{{title}} 󰎆 {{artist}}')
echo "$song_info"
'';
ewwWayland = pkgs.eww.overrideAttrs (oldAttrs: {
cargoBuildFlags = [
"--no-default-features"
"--features=wayland"
"--bin"
"eww"
];
});
in
{
home.packages = with pkgs; [
@ -49,7 +39,6 @@ in
yt-dlp
hyprpaper
hyprcursor
ewwWayland
];
systemd.user.targets.hyprland-session.Unit.Wants = [

View file

@ -288,11 +288,6 @@ in
nixd = {
cmd = { "nixd" },
filetypes = { "nix" },
single_file_support = true,
root_dir = function(fname)
return require("lspconfig.util").root_pattern("flake.nix")(fname)
or vim.fs.dirname(vim.fs.find(".git", { path = fname, upward = true })[1])
end,
settings = {
nixd = {
nixpkgs = {

View file

@ -12,7 +12,7 @@ let
(lib.head oldAttrs.desktopItems).override {
name = "discord";
desktopName = "Discord";
exec = if nvidia-offload-enabled == true then "offload vesktop %U" else "vesktop %U";
exec = if nvidia-offload-enabled == true then "nvidia-offload vesktop %U" else "vesktop %U";
}
);
@ -32,9 +32,7 @@ let
echo '${discordIcon}' > $out/share/icons/hicolor/scalable/apps/vesktop.svg
'';
});
in
# zen-browser = pkgs.callPackage ../../pkgs/zen-browser.nix { };
{
home.packages =
(with pkgs; [
@ -47,9 +45,6 @@ in
python-pkgs.weasyprint
]))
rustup
pkgsCross.mingwW64.stdenv.cc
pkgsCross.mingwW64.windows.pthreads
postman
ripdrag
# Work stuff
@ -62,6 +57,7 @@ in
# Gaming
steam-run
protonup
# Downloads
qbittorrent
@ -81,6 +77,9 @@ in
])
++ [
vesktopOverride # discord
# zen-browser
];
home.sessionVariables = {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
};
}

View file

@ -8,7 +8,7 @@
# Nixos
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos";
fullClean = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
fullClean = "sudo nix store gc && sudo /run/current-system/bin/switch-to-configuration boot";
# Hyprland
hyprlog = "grep -v \"arranged\" $XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | cat";