diff --git a/base/hardware.nix b/base/hardware.nix index bc59584..d7f0905 100644 --- a/base/hardware.nix +++ b/base/hardware.nix @@ -3,8 +3,5 @@ services.udev.extraRules = '' # Keychron C2 function key fix SUBSYSTEMS=="input", ATTRS{name}=="Keychron Keychron C2", RUN+="${pkgs.bash}/bin/bash -c 'echo 0 > /sys/module/hid_apple/parameters/fnmode'" - - # EM8026 thermal printer - SUBSYSTEM=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0289", MODE="0660", GROUP="plugdev" ''; } diff --git a/hosts/x270.nix b/hosts/x270.nix index 1fc9ee7..30f75e8 100644 --- a/hosts/x270.nix +++ b/hosts/x270.nix @@ -1,19 +1,38 @@ { lib, pkgs, ... }: { - imports = [ - - ]; hardware.trackpoint = { enable = true; sensitivity = 230; speed = 170; }; - hardware.graphics = { + # Ensure that trackpoint mouse buttons work after suspend without having + # to touch the trackpoint first + powerManagement = { + powerDownCommands = '' + modprobe -r psmouse + ''; + resumeCommands = '' + modprobe psmouse + ''; + }; + + services.xserver.videoDrivers = [ "modesetting" ]; + + boot.initrd.kernelModules = [ "i915" ]; + hardware.opengl = { enable = true; # driSupport = true; # driSupport32Bit = true; }; + environment.variables = { + VDPAU_DRIVER = "va_gl"; + }; + hardware.opengl.extraPackages = with pkgs; [ + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) + libvdpau-va-gl + intel-media-driver + ]; console = { font = "Lat2-Terminus16"; diff --git a/hosts/xfce.nix b/hosts/xfce.nix index d2e996e..42d0d2f 100644 --- a/hosts/xfce.nix +++ b/hosts/xfce.nix @@ -3,15 +3,11 @@ services.xserver = { enable = true; desktopManager = { - xfce= { - enable = true; - enableXfwm = true; - }; + xfce.enable = true; xterm.enable = false; }; displayManager = { lightdm.enable = true; - gdm.wayland = false; }; }; services.displayManager = { @@ -20,12 +16,8 @@ autoLogin.user = "fruchti"; }; services.libinput.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; + nixpkgs.config.pulseaudio = true; + hardware.pulseaudio.enable = true; hardware.bluetooth.enable = true; services.blueman.enable = true; # environment.xfce.excludePackages = with pkgs.xfce; [ @@ -40,7 +32,7 @@ lounge-gtk-theme hackneyed blueman - file-roller + gnome.file-roller ]; security.pam.services.lightdm.enableGnomeKeyring = true; services.gnome.gnome-keyring.enable = true; diff --git a/overlays/default.nix b/overlays/default.nix index 7cd1fd2..eab7738 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -2,5 +2,6 @@ { imports = [ ./burp.nix + ./horizon-eda.nix ]; } diff --git a/overlays/horizon-eda.nix b/overlays/horizon-eda.nix new file mode 100644 index 0000000..3022fdf --- /dev/null +++ b/overlays/horizon-eda.nix @@ -0,0 +1,13 @@ +{ config, ... }: +{ + nixpkgs.overlays = [ + (self: super: { + horizon-eda = (super.horizon-eda.overrideAttrs (old: { + # Add an environment variable to fix redraw issues on Intel Graphics + patches = [ + ./horizon_software_draw_surface.patch + ]; + })); + }) + ]; +} diff --git a/overlays/horizon_software_draw_surface.patch b/overlays/horizon_software_draw_surface.patch new file mode 100644 index 0000000..c44c667 --- /dev/null +++ b/overlays/horizon_software_draw_surface.patch @@ -0,0 +1,10 @@ +diff --git a/org.horizon_eda.HorizonEDA.desktop b/org.horizon_eda.HorizonEDA.desktop +index 7551df54..d8df7800 100644 +--- a/org.horizon_eda.HorizonEDA.desktop ++++ b/org.horizon_eda.HorizonEDA.desktop +@@ -5,4 +5,4 @@ Categories=Development;Engineering;Electronics; + Type=Application + Terminal=false + Icon=org.horizon_eda.HorizonEDA +-Exec=horizon-eda %U ++Exec=env GDK_GL=software-draw-surface horizon-eda %U