lots of unfree and intel acceleration

This commit is contained in:
Peder Bergebakken Sundt 2023-03-03 02:24:07 +01:00
parent 74f808b952
commit feb9d41ce1
3 changed files with 15 additions and 1 deletions

2
.envrc
View File

@ -1 +1,3 @@
if ! command -v nixos-rebuild >/dev/null; then
use nix use nix
fi

View File

@ -10,6 +10,7 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = (pkg: true); nixpkgs.config.allowUnfreePredicate = (pkg: true);
nixpkgs.config.nonfreeLicensing = true; # used by ffmpeg
# 'nixos-rebuild switch --upgrade', by default daily with no reboot # 'nixos-rebuild switch --upgrade', by default daily with no reboot
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
@ -34,8 +35,10 @@
"--no-write-lock-file" # no write new flakelock, as the in-store flake is read-only "--no-write-lock-file" # no write new flakelock, as the in-store flake is read-only
"-L" # print build logs "-L" # print build logs
]; ];
environment.etc."current-system-flake".source = inputs.self; # the plan was to allow me to locate the new flake.lock, but alas https://github.com/NixOS/nix/issues/6895
/**/ /**/
nix.settings.trusted-users = [ "root" ]; # default, but will stick around after a mergins with ./users nix.settings.trusted-users = [ "root" ]; # default, but will stick around after a mergins with ./users
nix.settings.auto-optimise-store = true; # deduplicate with hardlinks, expensive. Alternative: nix-store --optimise nix.settings.auto-optimise-store = true; # deduplicate with hardlinks, expensive. Alternative: nix-store --optimise
#nix.optimize.automatic = true; # periodic optimization #nix.optimize.automatic = true; # periodic optimization

View File

@ -2,6 +2,15 @@
{ {
# enable opengl (headless) # enable opengl (headless)
# https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/development/libraries/ffmpeg/generic.nix
# https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ?
nixpkgs.config.vaapiSupport = true;
nixpkgs.config.libmfxSupport = true; # intel
nixpkgs.config.libaomSupport = true;
nixpkgs.config.vdpauSupport = true; # intel
hardware.opengl.enable = true; hardware.opengl.enable = true;
#hardware.opengl.extraPackages = [ pkgs.mesa.drivers ]; #hardware.opengl.extraPackages = [ pkgs.mesa.drivers ];
hardware.opengl.extraPackages = with pkgs; [ mesa.drivers vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]; hardware.opengl.extraPackages = with pkgs; [ mesa.drivers vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ];