diff --git a/.envrc b/.envrc index 1d953f4..5099346 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,3 @@ -use nix +if ! command -v nixos-rebuild >/dev/null; then + use nix +fi diff --git a/base.nix b/base.nix index fc79466..c727028 100644 --- a/base.nix +++ b/base.nix @@ -10,6 +10,7 @@ nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfreePredicate = (pkg: true); + nixpkgs.config.nonfreeLicensing = true; # used by ffmpeg # 'nixos-rebuild switch --upgrade', by default daily with no reboot system.autoUpgrade.enable = true; @@ -34,8 +35,10 @@ "--no-write-lock-file" # no write new flakelock, as the in-store flake is read-only "-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.auto-optimise-store = true; # deduplicate with hardlinks, expensive. Alternative: nix-store --optimise #nix.optimize.automatic = true; # periodic optimization diff --git a/hardware/opengl-intel.nix b/hardware/opengl-intel.nix index 7736384..297f1fb 100644 --- a/hardware/opengl-intel.nix +++ b/hardware/opengl-intel.nix @@ -2,6 +2,15 @@ { # 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.extraPackages = [ pkgs.mesa.drivers ]; hardware.opengl.extraPackages = with pkgs; [ mesa.drivers vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ];