From 1e99e723c598fface4bedffe60220d2c424bcae9 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 4 Feb 2023 14:17:17 +0530 Subject: enable i915 --- hosts/myrtle/configuration.nix | 63 +++++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 13 deletions(-) (limited to 'hosts/myrtle') diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix index db70416..74f4861 100644 --- a/hosts/myrtle/configuration.nix +++ b/hosts/myrtle/configuration.nix @@ -12,7 +12,7 @@ boot.kernelPackages = pkgs.linuxPackages_latest; boot.blacklistedKernelModules = [ "nouveau" ]; boot.kernelParams = [ - "module_blacklist=i915" + "i915.modeset=0" # "intel_pstate=disable" ]; @@ -54,18 +54,23 @@ vim-colors-plain ]; - environment.systemPackages = with pkgs; [ - _2bwm - man-pages - man-pages-posix - (lib.hiPrio pkgs.bashInteractive_5) + environment = { + variables = { + MOZ_USE_XINPUT2 = "1"; + }; + systemPackages = with pkgs; [ + _2bwm + man-pages + man-pages-posix + (lib.hiPrio pkgs.bashInteractive_5) - # turbo - config.boot.kernelPackages.turbostat - config.boot.kernelPackages.nvidia_x11 + # turbo + config.boot.kernelPackages.turbostat + config.boot.kernelPackages.nvidia_x11 - xdotool - ]; + xdotool + ]; + }; documentation = { @@ -86,7 +91,9 @@ }; sound.enable = true; + hardware = { + opengl.driSupport = true; pulseaudio = { enable = true; package = pkgs.pulseaudioFull; @@ -96,19 +103,46 @@ enable = true; powerOnBoot = true; }; - nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; + nvidia = { + prime = { + offload.enable = true; + intelBusId = "PCI:00:02:0"; + nvidiaBusId = "PCI:01:00:0"; + }; + package = config.boot.kernelPackages.nvidiaPackages.latest; + powerManagement = { + enable = true; + finegrained = true; + }; + }; }; + powerManagement = { + enable = true; + powertop.enable = true; + }; services = { xserver = { enable = true; layout = "us"; - videoDrivers = [ "nvidia" ]; + videoDrivers = [ "nvidia" "intel" ]; displayManager.startx.enable = true; + dpi = 192; libinput.enable = true; + serverLayoutSection = '' + Screen "Screen-nvidia[0]" + ''; + config = lib.mkAfter '' + Section "Screen" + Identifier "Screen-nvidia[0]" + Device "Device-nvidia[0]" + EndSection + ''; }; + openssh.enable = true; + asusd = { enable = true; enableUserService = true; @@ -138,6 +172,9 @@ isNormalUser = true; home = "/home/np"; extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ]; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCrmh1vEWwKm8gpOk9j3DkZsiJCojpBdxuWU4M8rFeV/U9isRB+3pSJvF3Sncc6Yd+hSDohpzQF/Q5urubjkrGDniAKFjZnUHWZEzJmfQLHLIHXBkHjY8UMYF/WZprcplBKAZ7S9tS0YGa6NOQe2KEFtNG6XtBnrI3lswAHPOlqKJBG47MxfjIi9aUhczlzPxtGC9AfdwaNQYgLoJ91I6jkKuyKjbYt8KDDL+6PJ63TZc18LKKct1rf+ejRJKR9+jHTkEXhltUSQkieOJiEOdVcYWbYBxSoWutrnrksnhi9dLABOvueG6mAORU5g1yrMnX80RbK8DauwG4WI9qIGvHNPpQqP0vjj4mr8YkOUmzyeTW3KlOsQJZ7279WruBYV96/a7YoHKj9fGzV4McvVpvLMYa47hqyCBRK/qz0BSLFEhSNZzqseXCk91qZ0EhROBQEckqlKVip75YWFhqjVrgSPnVYWHxceNMttKmfGgIGXI8Bc8TKRZd+7quJNG7cWIE= np@olive" + ]; }; nix = { -- cgit v1.2.3