Some checks failed
Nix Format Check / check-format (push) Failing after 38s
adds noatime to all devices root partition mount options adds cosmic desktop to workstations adds xanmod kernel to workstations adds xanmod with zfs to servers adds perplexityai extension to brave removes openra flatpak adds threads limit to upgrade command to prevent system freezes removes fcitx5 completely
85 lines
1.6 KiB
Nix
85 lines
1.6 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
modulesPath,
|
|
...
|
|
}:
|
|
{
|
|
imports = [ /etc/nixos/hardware-configuration.nix ];
|
|
networking.hostName = "mennos-laptop";
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-uuid/1356cd09-5c55-45b5-8b06-6aadc84cee37";
|
|
fsType = "ext4";
|
|
options = [ "noatime" ];
|
|
};
|
|
|
|
# Bootloader
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
# Enable graphics
|
|
hardware.graphics = {
|
|
enable = true;
|
|
extraPackages = with pkgs; [
|
|
amdvlk
|
|
rocmPackages.clr
|
|
];
|
|
};
|
|
|
|
# Swap file (Laptop has 32GB of RAM so 8GB swap should be enough)
|
|
swapDevices = [
|
|
{
|
|
device = "/swapfile";
|
|
size = 8192;
|
|
}
|
|
];
|
|
|
|
# Load AMD and NVIDIA drivers for Xorg and Wayland
|
|
services.xserver.videoDrivers = [
|
|
"nvidia"
|
|
"amdgpu"
|
|
];
|
|
|
|
# Monitoring tools
|
|
environment.systemPackages = with pkgs; [
|
|
nvtopPackages.nvidia
|
|
nvtopPackages.amd
|
|
glxinfo
|
|
vulkan-tools
|
|
];
|
|
|
|
hardware.nvidia = {
|
|
# Enable modesetting
|
|
modesetting.enable = true;
|
|
|
|
# Power management configuration
|
|
powerManagement = {
|
|
enable = true;
|
|
finegrained = false; # Disabled as it requires offload mode
|
|
};
|
|
|
|
# Prime configuration for hybrid graphics
|
|
prime = {
|
|
offload = {
|
|
enable = true;
|
|
enableOffloadCmd = true;
|
|
};
|
|
|
|
# AMD GPU as primary
|
|
amdgpuBusId = "PCI:5:0:0";
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
};
|
|
|
|
open = false;
|
|
nvidiaSettings = true;
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
};
|
|
|
|
boot.kernelParams = [
|
|
"amdgpu.sg_display=0"
|
|
"nvidia-drm.modeset=1"
|
|
];
|
|
}
|