nixos-config/hosts/ni/hardware-configuration.nix
Gabriel Arazas 18e2743be2
hosts/ni: update iwd configuration
iwd and udev are going into a race condition and I cannot easily remove
attribute in a NixOS module so we'll be forcing the iwd systemd-networkd
configuration to be empty instead.
2023-03-19 09:58:50 +08:00

75 lines
1.6 KiB
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
./modules/hardware/traditional-networking.nix
];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# The simpler WiFi manager.
networking.wireless.iwd = {
enable = true;
settings = {
General = {
EnableNetworkConfiguration = true;
ControlPortOverNL80211 = true;
};
Network.NameResolvingService = "systemd";
Settings.AutoConnect = true;
};
};
# Welp....
systemd.network.links."80-iwd" = {
matchConfig = lib.mkForce { };
linkConfig = lib.mkForce { };
};
# Set the NetworkManager backend to iwd for workflows that use it.
networking.networkmanager.wifi.backend = "iwd";
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot = {
enable = true;
netbootxyz.enable = true;
};
boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/" = {
label = "root";
options = [
"defaults"
"noatime"
];
fsType = "ext4";
};
fileSystems."/boot" = {
label = "boot";
fsType = "vfat";
};
swapDevices = [{ label = "swap"; }];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
# Set up printers.
services.printing = {
enable = true;
browsing = true;
drivers = with pkgs; [
gutenprint
hplip
splix
];
};
}