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

58 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-16 02:51:46 +03:00
{ 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;
2024-08-21 11:20:03 +03:00
hardware.graphics = {
enable = true;
enable32Bit = true;
};
2024-04-16 02:51:46 +03:00
# 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
'';
}