dotfiles/nixos/common-hardware.nix
Cyryl Płotnicki 1a4a4dc067
Some checks failed
use nix / build (push) Failing after 3m51s
upgrade to 24.11
2024-12-01 12:08:22 +00:00

92 lines
2 KiB
Nix

{
config,
pkgs,
nixpkgs-nixos-unstable-and-unfree,
lib,
...
}: {
boot.kernelModules = ["fuse"];
networking.networkmanager = {
enable = true;
};
security.rtkit.enable = true;
services = {
smartd.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
printing = {
enable = true;
drivers = with pkgs; [
epson-escpr
nixpkgs-nixos-unstable-and-unfree.samsung-unified-linux-driver
gutenprint
];
extraConf = ''
Option pdftops-renderer hybrid
'';
};
udev.packages = [];
};
environment.systemPackages = with pkgs; [ghostscript poppler];
hardware = {
enableRedistributableFirmware = true;
cpu.intel.updateMicrocode = true;
bluetooth = {
enable = true;
package = pkgs.bluez;
settings = {General = {Enable = "Source,Sink,Media,Socket";};};
};
pulseaudio.enable = false;
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";
};
}
];
sane = {
enable = true;
snapshot = true;
extraBackends = with pkgs; [
nixpkgs-nixos-unstable-and-unfree.samsung-unified-linux-driver
sane-airscan
gawk
];
};
};
powerManagement = {
enable = lib.mkForce true;
resumeCommands = ''
${pkgs.autorandr}/bin/autorandr -c
'';
powertop.enable = true;
};
}