nixos-config/hosts/ayame.nix

102 lines
2.6 KiB
Nix

{ config, pkgs, modulesPath, lib, ... }:
let
customPkgs = import ../packages/overlay.nix;
unstable = (import ../modules/unstable.nix config);
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
../modules/users/alexander.nix
../modules/programs/zsh ../modules/programs/mpv ../modules/programs/git ../modules/programs/tmux ../modules/programs/firefox ../modules/programs/gnome-terminal ../modules/programs/gnome ../modules/programs/nonvm
../modules/programs/distributed-build/offload.nix
];
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 = {
efi.canTouchEfiVariables = false;
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 = [];
kernelPackages = pkgs.linuxPackages_zen;
};
hardware = {
opengl = {
extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];
};
};
services = {
xserver.videoDrivers = [ "modesetting" "fbdev" ];
};
#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";
# };
# };
#};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/root";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/cf3b1e1c-c245-4452-ad49-68ac72369e77"; }
];
}