From e62d4988c1c2c9da23b41f3b9572130555f61f9b Mon Sep 17 00:00:00 2001 From: iFargle Date: Wed, 12 Jul 2023 12:54:40 +0900 Subject: [PATCH] test --- common/dotfiles/bash.nix | 3 +++ desktops/gnome-unstable.nix | 1 + desktops/gnome.nix | 1 + hosts/nixos-laptop/configuration.nix | 7 ++++++- hosts/nixos-laptop/hardware-configuration.nix | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/dotfiles/bash.nix b/common/dotfiles/bash.nix index 2da26ca0..d19c8262 100644 --- a/common/dotfiles/bash.nix +++ b/common/dotfiles/bash.nix @@ -25,6 +25,9 @@ # Disable askpass for cli auth: SSH_ASKPASS = ""; + # nVidia prime selector alias: + prime-select = "nvidia-offload" + # docker d = "docker"; dc = "docker-compose"; diff --git a/desktops/gnome-unstable.nix b/desktops/gnome-unstable.nix index 87896e7a..ae3ceb30 100644 --- a/desktops/gnome-unstable.nix +++ b/desktops/gnome-unstable.nix @@ -45,6 +45,7 @@ gnomeExtensions.caffeine gnomeExtensions.hibernate-status-button gnomeExtensions.night-theme-switcher + gnomeExtensions.prime-gpu-profile-selector # Gnome relevant packages gnome3.gnome-tweaks diff --git a/desktops/gnome.nix b/desktops/gnome.nix index 3e95ce4e..44bcca7e 100644 --- a/desktops/gnome.nix +++ b/desktops/gnome.nix @@ -45,6 +45,7 @@ gnomeExtensions.caffeine gnomeExtensions.hibernate-status-button gnomeExtensions.night-theme-switcher + gnomeExtensions.prime-gpu-profile-selector # Gnome relevant packages gnome3.gnome-tweaks diff --git a/hosts/nixos-laptop/configuration.nix b/hosts/nixos-laptop/configuration.nix index 9272834d..382a3f01 100644 --- a/hosts/nixos-laptop/configuration.nix +++ b/hosts/nixos-laptop/configuration.nix @@ -35,14 +35,19 @@ nvidia.powerManagement.enable = true; nvidia.prime = { + sync.enable = true; offload.enable = true; + offload.enableOffloadCmd = true; intelBusId = lib.mkDefault "PCI:0:2:0"; nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; # Fingerprint software - environment.systemPackages = with pkgs; [ fprintd ]; + environment.systemPackages = with pkgs; [ + fprintd + nvtop-nvidia + ]; imports = [ # Modules diff --git a/hosts/nixos-laptop/hardware-configuration.nix b/hosts/nixos-laptop/hardware-configuration.nix index c7b25f77..6884b774 100644 --- a/hosts/nixos-laptop/hardware-configuration.nix +++ b/hosts/nixos-laptop/hardware-configuration.nix @@ -38,6 +38,6 @@ # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } \ No newline at end of file