diff --git a/global/software-configuration.nix b/global/software-configuration.nix index 2069b85..3cc3a08 100644 --- a/global/software-configuration.nix +++ b/global/software-configuration.nix @@ -46,6 +46,9 @@ accelProfile = "flat"; }; }; + videoDrivers = [ + "intel" + ]; }; pipewire = { @@ -80,9 +83,9 @@ programs = { thunar = { enable = true; - plugins = with pkgs.xfce; [ + plugins = with pkgs.xfce; [ thunar-archive-plugin - thunar-volman + thunar-volman ]; }; diff --git a/global/system-configuration.nix b/global/system-configuration.nix index 7411dd4..f3bf335 100644 --- a/global/system-configuration.nix +++ b/global/system-configuration.nix @@ -1,11 +1,27 @@ -{ +{ pkgs, lib, ... }: { sound.enable = true; networking.networkmanager.enable = true; time.timeZone = "Asia/Shanghai"; security.sudo.wheelNeedsPassword = false; + environment.variables.VDPAU_DRIVER = "va_gl"; hardware = { - opengl.enable = true; + opengl = { + enable = true; + extraPackages = with pkgs; [ + mesa.drivers + libvdpau-va-gl + intel-media-driver + vaapiVdpau + + ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + vaapiIntel + else + intel-vaapi-driver + ) + ]; + }; }; # Select internationalisation properties. diff --git a/hardware-configuration.nix b/hardware-configuration.nix index e3a9060..0b7d88b 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -23,7 +23,7 @@ }; initrd = { - #verbose = false; + verbose = false; availableKernelModules = [ "xhci_pci" "ahci" @@ -31,6 +31,7 @@ "usb_storage" "usbhid" "sd_mod" + "i915" ]; }; @@ -55,20 +56,26 @@ fileSystems."/boot" = { device = "/dev/disk/by-uuid/8095-BE1B"; fsType = "vfat"; + options = [ "discard" ]; }; fileSystems."/nix" = { device = "/dev/disk/by-uuid/d2fac87e-ce48-174a-a544-36606fd39ee0"; fsType = "ext4"; + options = [ "discard" ]; }; fileSystems."/home" = { device = "/dev/disk/by-uuid/4125f3b3-7613-a04b-910c-87169a7a87b3"; fsType = "ext4"; + options = [ "discard" ]; }; swapDevices = [ - { device = "/dev/nvme0n1p2"; } + { + device = "/dev/nvme0n1p2"; + options = [ "discard" ]; + } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking