Flake parts with x64 and ARM support for devshell on both Linux and Mac

This commit is contained in:
2023-07-01 18:30:30 -05:00
parent baf8223799
commit cfe907101d
20 changed files with 137 additions and 96 deletions

42
nix/system/hardware.nix Normal file
View File

@ -0,0 +1,42 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
"/nix" = {
device = "/dev/disk/by-label/SDA-EXT";
fsType = "ext4";
neededForBoot = true;
options = [ "noatime" ];
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}