Adding an iso configuration

This commit is contained in:
Lyes Saadi 2024-07-07 13:23:54 +02:00
parent 33782949ce
commit 35af3efeff
No known key found for this signature in database
GPG key ID: 17418538BAA17767
3 changed files with 84 additions and 63 deletions

View file

@ -9,6 +9,60 @@
# boot.kernelPackages = pkgs.linuxPackages_6_1;
boot.kernelPackages = pkgs.linuxPackages_latest;
# Boot
boot.loader.systemd-boot.extraEntries = {
"fedora.conf" = ''
title Fedora
efi /EFI/fedora/grubx64.efi
'';
};
# Filesystem
fileSystems = {
"/".options = [ "compress=zstd:1" ];
"/home".options = [ "compress=zstd:1" ];
"/nix".options = [ "compress=zstd:1" "noatime" ];
};
# Networking
networking.hostName = "lyes-pc";
# NVidia
services.xserver.videoDrivers = [ "nvidia" ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.nvidia = {
# Modesetting is needed for most wayland compositors
modesetting.enable = true;
# Use the open source version of the kernel module
# Only available on driver 515.43.04+
open = true;
# Enable the nvidia settings menu
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU
# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
# For containers
hardware.nvidia-container-toolkit.enable = true;
# Optimisation
# nixpkgs.hostPlatform = {
@ -77,58 +131,4 @@
# };
# };
# };
# Boot
boot.loader.systemd-boot.extraEntries = {
"fedora.conf" = ''
title Fedora
efi /EFI/fedora/grubx64.efi
'';
};
# Filesystem
fileSystems = {
"/".options = [ "compress=zstd:1" ];
"/home".options = [ "compress=zstd:1" ];
"/nix".options = [ "compress=zstd:1" "noatime" ];
};
# Networking
networking.hostName = "lyes-pc";
# NVidia
services.xserver.videoDrivers = [ "nvidia" ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.nvidia = {
# Modesetting is needed for most wayland compositors
modesetting.enable = true;
# Use the open source version of the kernel module
# Only available on driver 515.43.04+
open = true;
# Enable the nvidia settings menu
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU
# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
# For containers
hardware.nvidia-container-toolkit.enable = true;
}