system/hosts/home/hardware-configuration/default.nix

53 lines
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, ... }:
{
# Include the results of the hardware scan.
imports = [ ./generated.nix ];
# Add support of usb
boot.initrd.availableKernelModules = [ "usb_storage" ];
# Enable containers
# See: https://github.com/NixOS/nixpkgs/issues/38676
boot.kernelModules = [ "veth" ];
boot.extraModulePackages = with config.boot.kernelPackages; [
rtl88x2bu # wifi
];
networking = {
useDHCP = false;
interfaces = {
wlp3s0.useDHCP = true;
# wlp11s0f3u2.useDHCP = true;
};
};
# extra configs
hardware.bluetooth.enable = true;
# All monitors in the right order
# Source: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83
services.xserver.xrandrHeads = [
{
output = "DP-3";
monitorConfig = ''
Option "PreferredMode" "1920x1080"
Option "Rotate" "right"
'';
}
{
output = "DP-1";
primary = true;
monitorConfig = ''
Option "PreferredMode" "2560x1440"
'';
}
];
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
}