diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-12-14 16:53:04 -0500 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-12-14 16:54:17 -0500 |
| commit | 4826b2ef5cb0e54c49cd3c53f58caa5b49fab78c (patch) | |
| tree | 1434eb5f67fc1580a6ecbe7c474720608ccf477e | |
| parent | 0e8b26800a0faff17d2da96bf0b097bca0f15c16 (diff) | |
| download | home-4826b2ef5cb0e54c49cd3c53f58caa5b49fab78c.tar.gz | |
form: use stable kernel and nvidia drivers
| -rw-r--r-- | form/configuration.nix | 15 | ||||
| -rw-r--r-- | packages/mfcj995dw_driver.nix | 59 |
2 files changed, 71 insertions, 3 deletions
diff --git a/form/configuration.nix b/form/configuration.nix index f6347c7..f7703f8 100644 --- a/form/configuration.nix +++ b/form/configuration.nix @@ -29,7 +29,8 @@ "nvidia_drm" ]; boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; - # boot.kernelParams = []; + boot.kernelParams = ["module_blacklist=amdgpu"]; + boot.kernelPackages = lib.mkForce pkgs.linuxPackages; services.xserver.videoDrivers = [ "nvidia" ]; # services.desktopManager.plasma6.enable = true; # services.displayManager.sddm = { @@ -40,9 +41,14 @@ modesetting.enable = true; open = true; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = config.boot.kernelPackages.nvidiaPackages.stable; + powerManagement.enable = true; }; hardware.opengl.extraPackages = with pkgs; [ + # libva-vdpau-driver + nvidia-vaapi-driver + vdpauinfo + libva-utils libva-vdpau-driver ]; # services.openssh.enable = true; @@ -51,10 +57,13 @@ enable = true; displayManager = { defaultSession = "sway"; - gdm.enable = true; + # gdm.enable = true; + sddm.enable = true; }; + desktopManager.plasma6.enable = true; desktopManager.gnome.enable = true; }; + programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.kdePackages.ksshaskpass.out}/bin/ksshaskpass"; virtualisation.docker = { enable = true; rootless = { diff --git a/packages/mfcj995dw_driver.nix b/packages/mfcj995dw_driver.nix new file mode 100644 index 0000000..42b6529 --- /dev/null +++ b/packages/mfcj995dw_driver.nix @@ -0,0 +1,59 @@ +{ pkgs, lib, ... }: +let + myPatchElf = file: '' + patchelf --set-interpreter \ + ${pkgs.stdenv.cc.libc}/lib/ld-linux${lib.optionalString pkgs.stdenv.hostPlatform.is64bit "-x86-64"}.so.2 \ + ${file} + ''; +in +pkgs.stdenv.mkDerivation rec { + pname = "mfcj995dw"; + version = "1.0.5-0"; + src = pkgs.fetchurl { + url = "https://download.brother.com/welcome/dlf103811/mfcj995dwpdrv-${version}-0.i386.deb" + hash = ""; + }; + unpackPhase = '' + ar x $src + tar xfvz data.tar.gz + ''; + buildInputs = with pkgs; [ + cups + perl + stdenv.cc.libc + ghostscript + which + ]; + dontBuild=true; + + patchPhase = '' + INFDIR=opt/brother/Printers/mfcj995dw/inf + LPDDIR=opt/brother/Printers/mfcj995dw/lpd + + substituteInPlace $LPDDIR/filter_BrGenML1 \ + --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/mfcj995dw\"; #" + + ${myPatchElf "usr/bin/brprintconf_mfcj995dw"} + ''; + + installPhase = '' + INFDIR=opt/brother/Printers/mfcj995dw/inf + LPDDIR=opt/brother/Printers/mfcj995dw/lpd + + mkdir -p $out/$INFDIR + cp -rp $INFDIR/* $out/$INFDIR + mkdir -p $out/$LPDDIR + cp -rp $LPDDIR/* $out/LPDDIR + + mkdir -p $out/bin + cp -r usr/bin/brprintconf_mfcj995dw $out/bin"" + + mkdir -p $out/share/cups/model/ + cp ./opt/brother/Printer/brother/mfcj995dw/cupswrapper/brother_mfcj995dw_printer_en.ppd $out/share/cups/model + ''; + + meta = { + description = "Brother Mfcj995dw drivers"; + homepage = "http://www.brother.com"; + }; +} |