dot.nix/hosts/nixos/rune/hardware.nix
Chris Toph 1857f4e42b Integrates Chaotic Nyx and updates kernel config
• Adds Chaotic Nyx repository to flake config for bleeding edge packages
• Removes unused Xbox one controller configuration
• Imports Chaotic Nix modules and updates environment variables
• Switches kernel package from Zen to Cachyos for better performance
2025-05-28 14:58:16 -04:00

99 lines
2.9 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
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 = [ ];
};
# For less permission issues with SSHFS
programs.fuse.userAllowOther = true;
# File system configurations
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/d38c182c-6f05-4bf3-8a45-5532c10fd342";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/5B39-A7CB";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
};
swapDevices = [ { device = "/dev/disk/by-uuid/6586847d-eba9-4317-9077-98ae9b2812c9"; } ];
# Time and networking configurations
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="