Mostly security changes, add nouveau as a boot option, simplify settings and prepare for home-manager options

This commit is contained in:
Jimbo 2024-11-29 01:49:18 -05:00
parent 6021f46c20
commit 137a9ab6d9
58 changed files with 281 additions and 269 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
let
commonKernelParams = [
# VM/GPU passthrough
@ -21,6 +21,9 @@ in {
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
blacklistedKernelModules = [ "pcspkr" ];
# Enable cross-compilation
binfmt.emulatedSystems = [ "aarch64-linux" ];
# Needed for GPU passthrough
initrd.kernelModules = [
"vfio"
@ -33,4 +36,14 @@ in {
specialisation.gputwo.configuration = {
boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
};
# Use Nouveau
specialisation.nouveau.configuration.config = {
environment.sessionVariables = {
NIXOS_OZONE_WL = lib.mkForce "0";
WLR_RENDERER = lib.mkForce "vulkan";
};
system.video.nvidia.enable = lib.mkForce false;
system.video.nouveau.enable = lib.mkForce true;
};
}