Update Telescope command and modify NixOS configurations
- Update Telescope command in `telescope.nix` to use `grep_string` - Add `cpupower` and `lm_sensors` to `systemPackages` in `citadel/default.nix' - Enable power management for NVIDIA in `citadel/default.nix` and clean up udev rules formatting
This commit is contained in:
parent
2ef417b6b1
commit
a2d9828287
|
@ -22,7 +22,7 @@
|
||||||
# grep string under cursor
|
# grep string under cursor
|
||||||
mode = ["n"];
|
mode = ["n"];
|
||||||
key = "<Leader>fs";
|
key = "<Leader>fs";
|
||||||
action = "<cmd>Telescope string_grep<CR>";
|
action = "<cmd>Telescope grep_string<CR>";
|
||||||
options = {noremap = true;};
|
options = {noremap = true;};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,6 +108,11 @@ in {
|
||||||
XCURSOR_SIZE = "64";
|
XCURSOR_SIZE = "64";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.linuxKernel.packages.linux_zen.cpupower
|
||||||
|
pkgs.lm_sensors
|
||||||
|
];
|
||||||
|
|
||||||
# services.tlp = {
|
# services.tlp = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# settings = {
|
# settings = {
|
||||||
|
@ -135,7 +140,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
prime = {
|
prime = {
|
||||||
|
@ -148,8 +153,8 @@ in {
|
||||||
};
|
};
|
||||||
nvidiaPersistenced = true;
|
nvidiaPersistenced = true;
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
powerManagement.enable = false;
|
powerManagement.enable = true;
|
||||||
powerManagement.finegrained = false;
|
powerManagement.finegrained = true;
|
||||||
open = false;
|
open = false;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
# FIXME issue with stable nvidia driver and latest linux kernel
|
# FIXME issue with stable nvidia driver and latest linux kernel
|
||||||
|
@ -169,26 +174,25 @@ in {
|
||||||
# https://discourse.nixos.org/t/how-to-use-nvidia-prime-offload-to-run-the-x-server-on-the-integrated-board/9091/15
|
# https://discourse.nixos.org/t/how-to-use-nvidia-prime-offload-to-run-the-x-server-on-the-integrated-board/9091/15
|
||||||
# for udev rules to disable dGPU when not in use
|
# for udev rules to disable dGPU when not in use
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
options nvidia NVreg_DynamicPowerManagement=0x02
|
|
||||||
options nvidia NVreg_EnableGpuFirmware=0
|
options nvidia NVreg_EnableGpuFirmware=0
|
||||||
'';
|
'';
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"
|
||||||
|
|
||||||
# Remove NVIDIA USB Type-C UCSI devices, if present
|
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"
|
||||||
|
|
||||||
# Remove NVIDIA Audio devices, if present
|
# Remove NVIDIA Audio devices, if present
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"
|
||||||
|
|
||||||
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
|
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
|
||||||
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
|
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
|
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
|
||||||
|
|
||||||
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
|
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
|
||||||
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
|
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
|
||||||
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
|
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
|
@ -49,7 +49,6 @@ in
|
||||||
pkgs.just
|
pkgs.just
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.vim
|
pkgs.vim
|
||||||
pkgs.linuxKernel.packages.linux_zen.cpupower
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
Loading…
Reference in New Issue