dotfiles/nixos/common-hardware.nix
2021-10-01 10:22:46 +01:00

62 lines
1.6 KiB
Nix

{ config, pkgs, lib, ... }:
{
boot.kernelModules = [ "fuse" ];
services.smartd.enable = true;
sound.enable = true;
networking.networkmanager.enable = true;
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = true;
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
support32Bit = true;
extraModules = [ pkgs.pulseaudio-modules-bt ];
daemon.config = {
nice-level= -15;
realtime-scheduling = "yes";
};
};
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
settings = {
General = { Enable = "Source,Sink,Media,Socket"; };
};
};
services.blueman.enable = true;
services.printing = {
enable = true;
drivers = with pkgs; [ epson-escpr samsung-unified-linux-driver ];
};
hardware.printers.ensurePrinters = [
{
description = "Epson XP-540 via bolty";
name = "epson_xp540_via_bolty";
deviceUri = "ipp://bolty:631/printers/epson_xp540";
model = "epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
ppdOptions = { PageSize = "A4"; Duplex = "DuplexNoTumble"; };
}
{
description = "Samsung SCX-4623 Series";
name = "samsung-SCX-4623";
deviceUri = "usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
model = "samsung/SCX-4623FW.ppd";
ppdOptions = { PageSize = "A4"; Duplex = "DuplexNoTumble"; };
}
];
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ samsung-unified-linux-driver ];
};
powerManagement.enable = (lib.mkForce true);
powerManagement.powertop.enable = true;
}