summaryrefslogtreecommitdiff
path: root/hosts/common/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/common/hardware')
-rw-r--r--hosts/common/hardware/default.nix6
-rw-r--r--hosts/common/hardware/nvidia.nix17
2 files changed, 23 insertions, 0 deletions
diff --git a/hosts/common/hardware/default.nix b/hosts/common/hardware/default.nix
new file mode 100644
index 0000000..e7e6350
--- /dev/null
+++ b/hosts/common/hardware/default.nix
@@ -0,0 +1,6 @@
+_: {
+ imports = [
+ ./nvidia.nix
+ ./zfs.nix
+ ];
+}
diff --git a/hosts/common/hardware/nvidia.nix b/hosts/common/hardware/nvidia.nix
new file mode 100644
index 0000000..4bc445c
--- /dev/null
+++ b/hosts/common/hardware/nvidia.nix
@@ -0,0 +1,17 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ hardware = {
+ nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
+ opengl = {
+ enable = true;
+ extraPackages = with pkgs; [
+ vaapiVdpau
+ ];
+ };
+ };
+
+ services.xserver.videoDrivers = ["nvidia"];
+}