From ddd6ecd05582c68e9c8581b4ee5ccd27ece8e1f6 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 1 Aug 2024 08:37:19 +0200 Subject: [PATCH] move some graphics stuff into individual modules/files --- common.nix | 1 - hosts/catbook-j/configuration.nix | 12 ------------ hosts/catbook-j/modules/default.nix | 1 + hosts/catbook-j/modules/graphics.nix | 12 ++++++++++++ hosts/monosodium-glutamate-g/configuration.nix | 5 ++--- hosts/monosodium-glutamate-g/modules/default.nix | 5 +++++ hosts/monosodium-glutamate-g/modules/graphics.nix | 7 +++++++ modules/default.nix | 1 + modules/graphics.nix | 3 +++ 9 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 hosts/catbook-j/modules/graphics.nix create mode 100644 hosts/monosodium-glutamate-g/modules/default.nix create mode 100644 hosts/monosodium-glutamate-g/modules/graphics.nix create mode 100644 modules/graphics.nix diff --git a/common.nix b/common.nix index c7cd1be..99e25fe 100644 --- a/common.nix +++ b/common.nix @@ -138,7 +138,6 @@ with builtins; { boot.kernel.sysctl."vm.max_map_count" = 2147483642; hardware = { - opengl.enable = true; uinput.enable = true; bluetooth.enable = true; # keyboard.uhk.enable = true; diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix index 342c186..d0f1c6b 100644 --- a/hosts/catbook-j/configuration.nix +++ b/hosts/catbook-j/configuration.nix @@ -46,18 +46,6 @@ S10E_JRNL_FILE_LOC = "/home/jade/Docs/jrnl.md"; }; - hardware.opengl = { - enable = true; - extraPackages = with pkgs; [ - intel-ocl - intel-media-driver - intel-vaapi-driver - intel-compute-runtime - libvdpau-va-gl - mesa.drivers - ]; - }; - programs.wireshark.enable = true; boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; diff --git a/hosts/catbook-j/modules/default.nix b/hosts/catbook-j/modules/default.nix index 935baf9..ffe8790 100644 --- a/hosts/catbook-j/modules/default.nix +++ b/hosts/catbook-j/modules/default.nix @@ -1,5 +1,6 @@ {...}: { imports = [ ./input.nix + ./graphics.nix ]; } diff --git a/hosts/catbook-j/modules/graphics.nix b/hosts/catbook-j/modules/graphics.nix new file mode 100644 index 0000000..e359044 --- /dev/null +++ b/hosts/catbook-j/modules/graphics.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + hardware.graphics = { + extraPackages = with pkgs; [ + intel-ocl + intel-media-driver + intel-vaapi-driver + intel-compute-runtime + libvdpau-va-gl + mesa.drivers + ]; + }; +} diff --git a/hosts/monosodium-glutamate-g/configuration.nix b/hosts/monosodium-glutamate-g/configuration.nix index 43e62b7..471c1a9 100644 --- a/hosts/monosodium-glutamate-g/configuration.nix +++ b/hosts/monosodium-glutamate-g/configuration.nix @@ -6,9 +6,11 @@ ./hardware-configuration.nix ../../common.nix ../../modules + ./modules ]; jade = { + hwKey.pamAuth.enable = true; desktop = { syncthing.enable = true; kdeconnect.enable = true; @@ -57,9 +59,6 @@ # TODO: clean up. zenstates zenmonitor - nvtop-amd - radeontop - rgp tea blender-hip ]; diff --git a/hosts/monosodium-glutamate-g/modules/default.nix b/hosts/monosodium-glutamate-g/modules/default.nix new file mode 100644 index 0000000..213189f --- /dev/null +++ b/hosts/monosodium-glutamate-g/modules/default.nix @@ -0,0 +1,5 @@ +{}: { + imports = [ + ./graphics.nix + ]; +} diff --git a/hosts/monosodium-glutamate-g/modules/graphics.nix b/hosts/monosodium-glutamate-g/modules/graphics.nix new file mode 100644 index 0000000..5732629 --- /dev/null +++ b/hosts/monosodium-glutamate-g/modules/graphics.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + environment.systemPackages = [ + pkgs.nvtop-amd + pkgs.radeontop + pkgs.rgp + ]; +} diff --git a/modules/default.nix b/modules/default.nix index adf3726..afe2abc 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -6,5 +6,6 @@ ./firewall.nix ./desktop-environment ./input + ./graphics.nix ]; } diff --git a/modules/graphics.nix b/modules/graphics.nix new file mode 100644 index 0000000..cc13a5a --- /dev/null +++ b/modules/graphics.nix @@ -0,0 +1,3 @@ +{}: { + graphics.enable = true; +}