hw changes

This commit is contained in:
elwrcl committed 2026-10-26 10:43:12 +03:00
1 parent 79f04eac6f
commit f46949b269
3 files changed
+25 -6

No files matched your search

+4
View File
@@ -94,6 +94,10 @@
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
}; };
# Through PAM, so every program of the session gets it; the cache
# stays in its default, persistent ~/.cache/mesa_shader_cache_db.
environment.sessionVariables.MESA_SHADER_CACHE_MAX_SIZE = "2G";
} }
(lib.mkIf (driver == "intel") intel) (lib.mkIf (driver == "intel") intel)
+4 -4
View File
@@ -1,4 +1,4 @@
{ ... }: { inputs, ... }:
{ {
flake.nixosModules.hw-ivb-drivers = flake.nixosModules.hw-ivb-drivers =
{ pkgs, ... }: { pkgs, ... }:
@@ -8,7 +8,7 @@
p.stdenv.mkDerivation { p.stdenv.mkDerivation {
pname = "ivb-drivers"; pname = "ivb-drivers";
version = "fork"; version = "fork";
src = ../../../drivers/ivb + "/${arch}"; src = inputs.ivb-drivers + "/ivb/${arch}";
nativeBuildInputs = [ p.autoPatchelfHook ]; nativeBuildInputs = [ p.autoPatchelfHook ];
buildInputs = with p; [ buildInputs = with p; [
@@ -65,12 +65,12 @@
}; };
# pocl with the gen7 device (OpenCL on the HD 4000) and the host CPU # pocl with the gen7 device (OpenCL on the HD 4000) and the host CPU
# device, from Drivers/pocl-gen7/release.sh. The gen7 device finds # device, from pocl-gen7/release.sh. The gen7 device finds
# libgbe and beignet's library in lib/beignet next to itself. # libgbe and beignet's library in lib/beignet next to itself.
pocl-gen7 = pkgs.stdenv.mkDerivation { pocl-gen7 = pkgs.stdenv.mkDerivation {
pname = "pocl-gen7"; pname = "pocl-gen7";
version = "release"; version = "release";
src = ../../../drivers/pocl-gen7; src = inputs.ivb-drivers + "/pocl-gen7";
nativeBuildInputs = [ pkgs.autoPatchelfHook ]; nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
+17 -2
View File
@@ -6,10 +6,25 @@
programs.gpu-screen-recorder.enable = true; programs.gpu-screen-recorder.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
services.gvfs.enable = true; services.gvfs.enable = true;
# Passwordless mount/unlock/eject for wheel in the local active session
# only; formatting, partitioning, secure erase etc. still ask.
security.polkit.extraConfig = '' security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) { polkit.addRule(function(action, subject) {
if (action.id.match("org.freedesktop.udisks2.") && var allowed = [
subject.isInGroup("wheel")) { "org.freedesktop.udisks2.filesystem-mount",
"org.freedesktop.udisks2.filesystem-mount-system",
"org.freedesktop.udisks2.filesystem-unmount-others",
"org.freedesktop.udisks2.encrypted-unlock",
"org.freedesktop.udisks2.encrypted-unlock-system",
"org.freedesktop.udisks2.eject-media",
"org.freedesktop.udisks2.eject-media-system",
"org.freedesktop.udisks2.power-off-drive",
"org.freedesktop.udisks2.power-off-drive-system",
"org.freedesktop.udisks2.loop-setup",
"org.freedesktop.udisks2.rescan"
];
if (allowed.indexOf(action.id) >= 0 &&
subject.isInGroup("wheel") && subject.local && subject.active) {
return polkit.Result.YES; return polkit.Result.YES;
} }
}); });