nixos/hosts/hardware/FredOS-Gaming.nix

59 lines
1.9 KiB
Nix
Raw Normal View History

2026-03-28 14:57:46 +00:00
#./hosts/hardware/FredOS-Gaming.nix
{ config, lib, pkgs, modulesPath, inputs, ... }:
2026-03-28 14:57:46 +00:00
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ];
boot.kernelPackages = lib.mkForce pkgs.cachyosKernels.linuxPackages-cachyos-bore;
# No binary cache for the cachyos kernel: garnix.io shut down July 2026 and
# lantian's attic (and its signing key) was dropped after the October 2026
# server compromise (xddxdd/nix-cachyos-kernel#110). The server builds it.
2026-03-28 14:57:46 +00:00
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" "ntsync" ];
2026-03-28 14:57:46 +00:00
boot.extraModulePackages = [ ];
# Sign systemd-boot and each NixOS generation for UEFI Secure Boot. Keys are
# machine-local and must exist before activation (`sudo sbctl create-keys`).
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
boot.loader.efi.canTouchEfiVariables = true;
environment.systemPackages = [ pkgs.sbctl ];
boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" "acpi_osi=\"!Windows 2015\"" "amdgpu.freesync_video=1" ];
2026-03-28 14:57:46 +00:00
fileSystems."/" = {
device = "/dev/disk/by-uuid/e2731038-9c65-430a-8628-b018cd6b8d9f";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7887-68BE";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
2026-03-28 14:57:46 +00:00
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "FredOS-Gaming";
hardware.graphics = {
enable = true;
enable32Bit = true;
};
services.xserver.videoDrivers = [ "amdgpu" ];
services.lact.enable = true;
2026-03-28 14:57:46 +00:00
system.stateVersion = "25.11";
}