dot.nix/hosts/x86/haze/hardware.nix

89 lines
2.6 KiB
Nix

{
pkgs,
inputs,
config,
lib,
modulesPath,
...
}:
{
imports = lib.flatten [
(modulesPath + "/installer/scan/not-detected.nix")
(map lib.custom.relativeToRoot [
"hosts/global/common/system/pool.nix"
])
];
## Boot ##
boot = {
loader = {
systemd-boot = {
enable = true;
# When using plymouth, initrd can expand by a lot each time, so limit how many we keep around
configurationLimit = lib.mkDefault 10;
};
efi.canTouchEfiVariables = true;
timeout = 3;
};
# Use the cachyos kernel for better performance
kernelPackages = pkgs.linuxPackages_cachyos;
initrd = {
systemd.enable = true;
verbose = false;
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
kernelModules = [ ];
};
kernelModules = [
"kvm-amd"
"amdgpu"
];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/5615474c-c665-407e-8f60-c221414ae343";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C9F2-4C1F";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/10529583-bde9-4aad-8001-f5954c4a1474"; }
];
time.hardwareClockInLocalTime = true; # Fixes windows dual-boot time issues
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
# networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableAllFirmware;
}
# STUFF ABOUT CHAOTIC NIX CACHE
# nix eval 'github:chaotic-cx/nyx/nyxpkgs-unstable#linuxPackages_cachyos.kernel.outPath'
# nix eval 'chaotic#linuxPackages_cachyos.kernel.outPath'
# nix eval '/pool/git/Nix/dot.nix#nixosConfigurations.rune.config.boot.kernelPackages.kernel.outPath'
# curl -L 'https://chaotic-nyx.cachix.org/{{HASH}}.narinfo'
# sudo nixos-rebuild switch --flake ./git/Nix/dot.nix/. --option 'extra-substituters' 'https://chaotic-nyx.cachix.org/' --option extra-trusted-public-keys "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="