mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
hw changes
This commit is contained in:
3 files changed
+25
-6
No files matched your search
@@ -94,6 +94,10 @@
|
||||
enable = 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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.nixosModules.hw-ivb-drivers =
|
||||
{ pkgs, ... }:
|
||||
@@ -8,7 +8,7 @@
|
||||
p.stdenv.mkDerivation {
|
||||
pname = "ivb-drivers";
|
||||
version = "fork";
|
||||
src = ../../../drivers/ivb + "/${arch}";
|
||||
src = inputs.ivb-drivers + "/ivb/${arch}";
|
||||
|
||||
nativeBuildInputs = [ p.autoPatchelfHook ];
|
||||
buildInputs = with p; [
|
||||
@@ -65,12 +65,12 @@
|
||||
};
|
||||
|
||||
# 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.
|
||||
pocl-gen7 = pkgs.stdenv.mkDerivation {
|
||||
pname = "pocl-gen7";
|
||||
version = "release";
|
||||
src = ../../../drivers/pocl-gen7;
|
||||
src = inputs.ivb-drivers + "/pocl-gen7";
|
||||
|
||||
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
|
||||
buildInputs = with pkgs; [
|
||||
|
||||
@@ -6,10 +6,25 @@
|
||||
programs.gpu-screen-recorder.enable = true;
|
||||
services.udisks2.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 = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.match("org.freedesktop.udisks2.") &&
|
||||
subject.isInGroup("wheel")) {
|
||||
var allowed = [
|
||||
"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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user