aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2023-02-04 08:47:17 +0000
committerAkshay <[email protected]>2023-02-04 08:47:17 +0000
commit1e99e723c598fface4bedffe60220d2c424bcae9 (patch)
tree946e18b94c3b87d46b9fcecc0bd563f693dfc460
parent7df356950a6a6455a562ea6d349b03945e189e46 (diff)
enable i915
-rw-r--r--home.nix4
-rw-r--r--hosts/myrtle/configuration.nix63
-rw-r--r--scripts/default.nix8
3 files changed, 57 insertions, 18 deletions
diff --git a/home.nix b/home.nix
index 16cc9dd..7c9ae93 100644
--- a/home.nix
+++ b/home.nix
@@ -69,6 +69,8 @@
69 69
70 # monitoring 70 # monitoring
71 s-tui 71 s-tui
72 nvtop
73 lshw
72 stress 74 stress
73 powertop 75 powertop
74 76
@@ -84,6 +86,7 @@
84 # work 86 # work
85 slack 87 slack
86 zoom-us 88 zoom-us
89
87 ] ++ (import ./scripts { inherit pkgs; }); 90 ] ++ (import ./scripts { inherit pkgs; });
88 91
89 xdg = { 92 xdg = {
@@ -103,7 +106,6 @@
103 windowManager.command = "2bwm"; 106 windowManager.command = "2bwm";
104 initExtra = '' 107 initExtra = ''
105 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}" 108 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}"
106 xrandr --dpi 192
107 xrdb -load $HOME/.Xresources 109 xrdb -load $HOME/.Xresources
108 ''; 110 '';
109 }; 111 };
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 @@
12 boot.kernelPackages = pkgs.linuxPackages_latest; 12 boot.kernelPackages = pkgs.linuxPackages_latest;
13 boot.blacklistedKernelModules = [ "nouveau" ]; 13 boot.blacklistedKernelModules = [ "nouveau" ];
14 boot.kernelParams = [ 14 boot.kernelParams = [
15 "module_blacklist=i915" 15 "i915.modeset=0"
16 # "intel_pstate=disable" 16 # "intel_pstate=disable"
17 ]; 17 ];
18 18
@@ -54,18 +54,23 @@
54 vim-colors-plain 54 vim-colors-plain
55 ]; 55 ];
56 56
57 environment.systemPackages = with pkgs; [ 57 environment = {
58 _2bwm 58 variables = {
59 man-pages 59 MOZ_USE_XINPUT2 = "1";
60 man-pages-posix 60 };
61 (lib.hiPrio pkgs.bashInteractive_5) 61 systemPackages = with pkgs; [
62 _2bwm
63 man-pages
64 man-pages-posix
65 (lib.hiPrio pkgs.bashInteractive_5)
62 66
63 # turbo 67 # turbo
64 config.boot.kernelPackages.turbostat 68 config.boot.kernelPackages.turbostat
65 config.boot.kernelPackages.nvidia_x11 69 config.boot.kernelPackages.nvidia_x11
66 70
67 xdotool 71 xdotool
68 ]; 72 ];
73 };
69 74
70 75
71 documentation = { 76 documentation = {
@@ -86,7 +91,9 @@
86 }; 91 };
87 92
88 sound.enable = true; 93 sound.enable = true;
94
89 hardware = { 95 hardware = {
96 opengl.driSupport = true;
90 pulseaudio = { 97 pulseaudio = {
91 enable = true; 98 enable = true;
92 package = pkgs.pulseaudioFull; 99 package = pkgs.pulseaudioFull;
@@ -96,19 +103,46 @@
96 enable = true; 103 enable = true;
97 powerOnBoot = true; 104 powerOnBoot = true;
98 }; 105 };
99 nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; 106 nvidia = {
107 prime = {
108 offload.enable = true;
109 intelBusId = "PCI:00:02:0";
110 nvidiaBusId = "PCI:01:00:0";
111 };
112 package = config.boot.kernelPackages.nvidiaPackages.latest;
113 powerManagement = {
114 enable = true;
115 finegrained = true;
116 };
117 };
100 }; 118 };
101 119
120 powerManagement = {
121 enable = true;
122 powertop.enable = true;
123 };
102 124
103 services = { 125 services = {
104 xserver = { 126 xserver = {
105 enable = true; 127 enable = true;
106 layout = "us"; 128 layout = "us";
107 videoDrivers = [ "nvidia" ]; 129 videoDrivers = [ "nvidia" "intel" ];
108 displayManager.startx.enable = true; 130 displayManager.startx.enable = true;
131 dpi = 192;
109 libinput.enable = true; 132 libinput.enable = true;
133 serverLayoutSection = ''
134 Screen "Screen-nvidia[0]"
135 '';
136 config = lib.mkAfter ''
137 Section "Screen"
138 Identifier "Screen-nvidia[0]"
139 Device "Device-nvidia[0]"
140 EndSection
141 '';
110 }; 142 };
111 143
144 openssh.enable = true;
145
112 asusd = { 146 asusd = {
113 enable = true; 147 enable = true;
114 enableUserService = true; 148 enableUserService = true;
@@ -138,6 +172,9 @@
138 isNormalUser = true; 172 isNormalUser = true;
139 home = "/home/np"; 173 home = "/home/np";
140 extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ]; 174 extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ];
175 openssh.authorizedKeys.keys = [
176 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCrmh1vEWwKm8gpOk9j3DkZsiJCojpBdxuWU4M8rFeV/U9isRB+3pSJvF3Sncc6Yd+hSDohpzQF/Q5urubjkrGDniAKFjZnUHWZEzJmfQLHLIHXBkHjY8UMYF/WZprcplBKAZ7S9tS0YGa6NOQe2KEFtNG6XtBnrI3lswAHPOlqKJBG47MxfjIi9aUhczlzPxtGC9AfdwaNQYgLoJ91I6jkKuyKjbYt8KDDL+6PJ63TZc18LKKct1rf+ejRJKR9+jHTkEXhltUSQkieOJiEOdVcYWbYBxSoWutrnrksnhi9dLABOvueG6mAORU5g1yrMnX80RbK8DauwG4WI9qIGvHNPpQqP0vjj4mr8YkOUmzyeTW3KlOsQJZ7279WruBYV96/a7YoHKj9fGzV4McvVpvLMYa47hqyCBRK/qz0BSLFEhSNZzqseXCk91qZ0EhROBQEckqlKVip75YWFhqjVrgSPnVYWHxceNMttKmfGgIGXI8Bc8TKRZd+7quJNG7cWIE= np@olive"
177 ];
141 }; 178 };
142 179
143 nix = { 180 nix = {
diff --git a/scripts/default.nix b/scripts/default.nix
index 627b121..b4ee23a 100644
--- a/scripts/default.nix
+++ b/scripts/default.nix
@@ -55,13 +55,13 @@ let
55 landscape-transform = builtins.toString [ 0 0 0 0 0 0 0 0 0 ]; 55 landscape-transform = builtins.toString [ 0 0 0 0 0 0 0 0 0 ];
56 portrait = pkgs.writeScriptBin "portrait" '' 56 portrait = pkgs.writeScriptBin "portrait" ''
57 ${pkgs.xorg.xrandr}/bin/xrandr -o left 57 ${pkgs.xorg.xrandr}/bin/xrandr -o left
58 ${pkgs.xorg.xinput}/bin/xinput set-prop ${touchscreen} --type=float "Coordinate Transformation Matrix" ${portait-transform} 58 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${portait-transform}
59 ${pkgs.xorg.xinput}/bin/xinput set-prop ${stylus} --type=float "Coordinate Transformation Matrix" ${portait-transform} 59 ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${portait-transform}
60 ''; 60 '';
61 landscape = pkgs.writeScriptBin "landscape" '' 61 landscape = pkgs.writeScriptBin "landscape" ''
62 ${pkgs.xorg.xrandr}/bin/xrandr -o normal 62 ${pkgs.xorg.xrandr}/bin/xrandr -o normal
63 ${pkgs.xorg.xinput}/bin/xinput set-prop ${touchscreen} --type=float "Coordinate Transformation Matrix" ${landscape-transform} 63 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${landscape-transform}
64 ${pkgs.xorg.xinput}/bin/xinput set-prop ${stylus} --type=float "Coordinate Transformation Matrix" ${landscape-transform} 64 ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${landscape-transform}
65 ''; 65 '';
66 66
67in 67in