Added hardware configuration to Pegasus

This commit is contained in:
2024-01-28 11:57:09 -04:00
parent 687c12daba
commit 567c698e7f
3 changed files with 45 additions and 28 deletions

View File

@@ -5,6 +5,8 @@ in {
system.stateVersion = "23.11";
imports = [
./hardware-configuration.nix
# Import system configuration
../../modules/system.nix
../../modules/containers.nix
@@ -20,33 +22,8 @@ in {
networking.useDHCP = lib.mkDefault true;
# Bootloader configuration
boot = {
kernelModules = ["kvm-intel"];
extraModulePackages = [];
initrd = {
kernelModules = [];
availableKernelModules = [
"xhci_pci"
"thunderbolt"
"vmd"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
};
loader = {
grub = {
enable = true;
useOSProber = true;
};
efi = {
canTouchEfiVariables = true;
};
};
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Setup Audio
sound.enable = true;

View File

@@ -0,0 +1,41 @@
# 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.
{
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/252491b6-ec4c-49f5-93ae-ed25ad640078";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/A50A-2C06";
fsType = "vfat";
};
swapDevices = [];
# 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.enp42s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}