mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
update system
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
stdenv,
|
||||
kernel,
|
||||
fetchFromGitHub,
|
||||
linuxConsoleTools,
|
||||
bash,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -12,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "gotzl";
|
||||
repo = "hid-fanatecff";
|
||||
rev = "0.1";
|
||||
rev = lib.versions.majorMinor version;
|
||||
hash = "sha256-1Nm/34Er/qfel9LJp++IWd7cTh2Wi93Kgd28YLMVvWo=";
|
||||
};
|
||||
|
||||
@@ -23,11 +25,27 @@ stdenv.mkDerivation rec {
|
||||
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
|
||||
substituteInPlace fanatec.rules \
|
||||
--replace-fail "/bin/sh" "${bash}/bin/sh"
|
||||
substituteInPlace fanatec.rules \
|
||||
--replace-fail "/usr/bin/evdev-joystick" "${linuxConsoleTools}/bin/evdev-joystick"
|
||||
|
||||
runHook postPatch
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/etc/udev/rules.d
|
||||
cp ${src}/fanatec.rules $out/etc/udev/rules.d/99-fanatec.rules
|
||||
cp fanatec.rules $out/etc/udev/rules.d/99-fanatec.rules
|
||||
|
||||
mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/hid
|
||||
cp hid-fanatec.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/hid
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.hardware.hid-fanatecff;
|
||||
kernelPackage = pkgs.callPackage ./hid-fanatecff-pkg.nix {
|
||||
@@ -14,28 +12,18 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
options.hardware.hid-fanatecff = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = lib.mdDoc ''
|
||||
Enables the Linux module drivers for Fanatec wheel bases.
|
||||
Works with the CSL Elite and CSL/ClubSport DD/DD Pro,
|
||||
and has experimental support for the ClubSport V2/V2.5,
|
||||
Podium DD1/DD2 and CSR Elite.
|
||||
'';
|
||||
};
|
||||
};
|
||||
options.hardware.hid-fanatecff.enable = lib.mkEnableOption "the Linux kernel drivers for Fanatec wheel bases";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot = {
|
||||
extraModulePackages = [ kernelPackage ];
|
||||
kernelModules = [ "hid-fanatecff" ];
|
||||
kernelModules = [ "hid-fanatec" ];
|
||||
};
|
||||
services.udev.packages = [ kernelPackage ];
|
||||
users.groups.games = { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
maintainers = with maintainers; [ theaninova ];
|
||||
maintainers = with lib.maintainers; [ theaninova ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ in
|
||||
users.users.${username}.extraGroups = [
|
||||
"wheel"
|
||||
"input"
|
||||
"games"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -37,6 +38,7 @@ in
|
||||
libsoup
|
||||
];
|
||||
})
|
||||
rpcs3
|
||||
wine
|
||||
winetricks
|
||||
protontricks
|
||||
|
||||
Reference in New Issue
Block a user