2021-07-29 20:21:51 +00:00
|
|
|
{ config, pkgs, modulesPath, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
customPkgs = import ./packages/overlay.nix;
|
|
|
|
unstable = (import ./modules/unstable.nix config);
|
2021-07-30 09:25:02 +00:00
|
|
|
mkPatch = name: {
|
|
|
|
name = name;
|
|
|
|
patch = ./patches/ayame/"${name}";
|
|
|
|
};
|
2021-07-29 20:21:51 +00:00
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
./generic.nix
|
|
|
|
./modules/hardware/generic.nix ./modules/hardware/bluetooth.nix ./modules/hardware/wifi.nix ./modules/hardware/video.nix ./modules/hardware/mobile.nix
|
|
|
|
./modules/fonts.nix
|
|
|
|
./modules/users/alexander.nix
|
|
|
|
./modules/programs/zsh ./modules/programs/mpv ./modules/programs/tmux ./modules/programs/firefox ./modules/programs/gnome-terminal ./modules/programs/gnome ./modules/programs/nonvm
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
customPkgs
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
|
|
nur = (import ./modules/nur.nix pkgs);
|
|
|
|
unstable = unstable;
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
unstable.firmwareLinuxNonfree
|
|
|
|
sof-firmware
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Disable dhcpcd as NetworkManager will do it for us
|
|
|
|
networking = {
|
|
|
|
interfaces.wlan0.useDHCP = false;
|
|
|
|
hostName = "ayame";
|
|
|
|
};
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
2021-07-30 08:29:14 +00:00
|
|
|
efi.canTouchEfiVariables = false;
|
2021-07-29 20:21:51 +00:00
|
|
|
grub = {
|
|
|
|
enable = true;
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
device = "nodev";
|
|
|
|
efiSupport = true;
|
|
|
|
# The UEFI is pretty wonky
|
|
|
|
forcei686 = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
extraModprobeConfig = "";
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
|
|
|
|
kernelModules = [
|
|
|
|
"kvm-intel" "i915"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
# This spams the console and takes up so much CPU time
|
|
|
|
kernelParams = [ "modprobe.blacklist=arizona_spi" ];
|
|
|
|
kernelModules = [];
|
|
|
|
extraModulePackages = [];
|
2021-07-30 09:25:02 +00:00
|
|
|
kernelPatches = [
|
|
|
|
(mkPatch 0001-mfd-arizona-Add-jack-pointer-to-struct-arizona.patch)
|
|
|
|
(mkPatch 0002-mfd-arizona-Add-MODULE_SOFTDEP-pre-arizona_ldo1.patch)
|
|
|
|
(mkPatch 0003-mfd-arizona-Add-support-for-ACPI-enumeration-of-WM51.patch)
|
|
|
|
(mkPatch 0004-mfd-arizona-Allow-building-arizona-MFD-core-as-modul.patch)
|
|
|
|
(mkPatch 0005-extcon-arizona-Fix-some-issues-when-HPDET-IRQ-fires-.patch)
|
|
|
|
(mkPatch 0006-extcon-arizona-Fix-various-races-on-driver-unbind.patch)
|
|
|
|
(mkPatch 0007-extcon-arizona-Fix-modalias.patch)
|
|
|
|
(mkPatch 0008-extcon-arizona-Fix-flags-parameter-to-the-gpiod_get-.patch)
|
|
|
|
(mkPatch 0009-extcon-arizona-Add-arizona_set_extcon_state-helper.patch)
|
|
|
|
(mkPatch 0010-extcon-arizona-Also-report-jack-state-through-snd_so.patch)
|
|
|
|
(mkPatch 0011-extcon-arizona-Use-ASoC-jack-input-device-when-avail.patch)
|
|
|
|
(mkPatch 0012-ASoC-Intel-Add-DMI-quirk-table-to-soc_intel_is_byt_c.patch)
|
|
|
|
(mkPatch 0013-ASoC-Intel-bytcr_wm5102-Add-machine-driver-for-BYT-W.patch)
|
|
|
|
(mkPatch 0014-ASoC-Intel-bytcr_wm5102-Add-jack-detect-support.patch)
|
|
|
|
{
|
|
|
|
name = "enable-wm5102";
|
|
|
|
patch = null;
|
|
|
|
extraConfig = ''
|
|
|
|
EXTCON_ARIZONA=m
|
|
|
|
MFD_WM5102=y
|
|
|
|
SND_SOC_WM5102=m
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
2021-07-29 20:21:51 +00:00
|
|
|
kernelPackages = pkgs.linuxPackages_zen;
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
opengl = {
|
|
|
|
extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver.videoDrivers = [ "modesetting" "fbdev" ];
|
|
|
|
};
|
|
|
|
|
2021-07-30 08:29:14 +00:00
|
|
|
#systemd.services = {
|
|
|
|
# rfkill-workaround = {
|
|
|
|
# enable = true;
|
|
|
|
# description = "Work around rfkill having the Wifi blocked at boot";
|
|
|
|
# before = [ "network.target" ];
|
|
|
|
# wantedBy = [ "multi-user.target" ];
|
|
|
|
# serviceConfig = {
|
|
|
|
# Type = "oneshot";
|
|
|
|
# ExecStart = "rfkill unblock all";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
#};
|
2021-07-29 20:21:51 +00:00
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/root";
|
|
|
|
fsType = "btrfs";
|
|
|
|
};
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/boot";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
swapDevices = [
|
2021-07-30 08:29:14 +00:00
|
|
|
{ device = "/dev/disk/by-uuid/cf3b1e1c-c245-4452-ad49-68ac72369e77"; }
|
2021-07-29 20:21:51 +00:00
|
|
|
];
|
|
|
|
}
|