2022-05-21 04:14:19 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
|
|
|
boot.initrd.kernelModules = [ ];
|
2022-05-22 07:01:56 +00:00
|
|
|
boot.initrd.supportedFilesystems = [ "ext4" "btrfs" "ext2" "ext3" "vfat" ];
|
2022-05-21 04:14:19 +00:00
|
|
|
# find more of these with sensors-detect
|
2022-05-22 06:31:38 +00:00
|
|
|
boot.kernelModules = [
|
|
|
|
"coretemp"
|
|
|
|
"kvm-intel"
|
|
|
|
"kvm-amd" # desktop
|
|
|
|
"amdgpu" # desktop
|
|
|
|
];
|
2022-05-21 04:14:19 +00:00
|
|
|
boot.extraModulePackages = [ ];
|
2022-05-22 05:00:38 +00:00
|
|
|
boot.kernelParams = [ "boot.shell_on_fail" ];
|
|
|
|
boot.consoleLogLevel = 7;
|
2022-05-21 04:14:19 +00:00
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
# enable cross compilation
|
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
|
|
|
|
powerManagement.cpuFreqGovernor = "powersave";
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
2022-05-22 06:31:38 +00:00
|
|
|
hardware.cpu.amd.updateMicrocode = true; # desktop
|
|
|
|
hardware.cpu.intel.updateMicrocode = true; # laptop
|
2022-05-21 04:14:19 +00:00
|
|
|
powerManagement.powertop.enable = true;
|
|
|
|
services.fwupd.enable = true;
|
|
|
|
|
|
|
|
hardware.opengl.extraPackages = [
|
2022-05-22 06:31:38 +00:00
|
|
|
# laptop
|
2022-05-21 04:14:19 +00:00
|
|
|
pkgs.intel-compute-runtime
|
|
|
|
pkgs.intel-media-driver # new
|
|
|
|
pkgs.libvdpau-va-gl # new
|
|
|
|
pkgs.vaapiIntel
|
2022-05-22 06:31:38 +00:00
|
|
|
# desktop
|
|
|
|
pkgs.rocm-opencl-icd
|
|
|
|
pkgs.rocm-opencl-runtime
|
2022-05-21 04:14:19 +00:00
|
|
|
];
|
2022-05-22 06:31:38 +00:00
|
|
|
hardware.opengl.driSupport = true;
|
|
|
|
# For 32 bit applications
|
|
|
|
hardware.opengl.driSupport32Bit = true;
|
|
|
|
|
2022-05-21 04:14:19 +00:00
|
|
|
|
2022-05-22 05:00:38 +00:00
|
|
|
fileSystems."/" = lib.mkDefault {
|
|
|
|
device = "/dev/disk/by-uuid/75230e56-2c69-4e41-b03e-68475f119980";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
2022-05-22 01:05:32 +00:00
|
|
|
"compress=zstd"
|
|
|
|
"defaults"
|
|
|
|
];
|
|
|
|
};
|
2022-05-21 04:14:19 +00:00
|
|
|
|
2022-05-22 05:00:38 +00:00
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = lib.mkDefault "/dev/disk/by-uuid/BD79-D6BB";
|
2022-05-22 01:05:32 +00:00
|
|
|
fsType = "vfat";
|
|
|
|
};
|
2022-05-21 04:14:19 +00:00
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
time.timeZone = "America/Los_Angeles";
|
|
|
|
|
|
|
|
# start gnome/gdm on boot
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
|
|
|
|
2022-05-22 01:05:32 +00:00
|
|
|
# services.snapper.configs = {
|
|
|
|
# root = {
|
|
|
|
# subvolume = "/";
|
|
|
|
# extraConfig = {
|
|
|
|
# ALLOW_USERS = "colin";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# services.snapper.snapshotInterval = "daily";
|
|
|
|
|
2022-05-21 04:14:19 +00:00
|
|
|
networking.useDHCP = false;
|
|
|
|
networking.networkmanager.enable = true;
|
2022-05-22 01:05:32 +00:00
|
|
|
networking.wireless.enable = lib.mkForce false;
|
2022-05-21 04:14:19 +00:00
|
|
|
|
|
|
|
}
|