Successfully add drivers for Brother printer, maybe successfully add scanner?

And some other printer-realted programs that may or may not have been needed.
This commit is contained in:
benjamin melançon 2025-07-01 16:10:29 -04:00
parent c0eb9c6edc
commit 24448888ce

View file

@ -9,6 +9,8 @@
[
# Include the results of the hardware scan.
./hardware-configuration.nix
# Support Brother scanner
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
# Include Framework-specific tweaks supported by the NixOS community
<nixos-hardware/framework/16-inch/common>
# This amazing script seems to cause the computer to not have a properly functioning screen
@ -34,6 +36,7 @@
calibre
contrast
# cruft
cups-brother-hll2375dw
curl
ddev
diffr
@ -133,6 +136,7 @@
sly # simple image editing
starship # fancy command line prompt
strawberry-qt6
system-config-printer
tdf # Terminal PDF viewer
textpieces
tldr
@ -190,6 +194,20 @@
options = "--delete-older-than 60d";
};
# Hardware
# hardware.sane.enable = true; # enables support for SANE scanners per https://wiki.nixos.org/wiki/Scanners
hardware = {
sane = {
enable = true;
brscan4 = {
enable = true;
netDevices = {
home = { model = "HL-L2380DW"; ip = "192.168.178.23"; };
};
};
};
};
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -246,7 +264,14 @@
console.keyMap = "dvorak";
# Enable CUPS to print documents.
# services.printing.enable = true;
services.printing.enable = true;
# Add Brother printer drivers, per https://nixos.wiki/wiki/Hardware/Brother
services.printing.drivers = [
pkgs.brlaser
pkgs.brgenml1lpr
pkgs.brgenml1cupswrapper
];
# Enable sound with pipewire.
services.pulseaudio.enable = false;
@ -282,7 +307,7 @@
users.users.mlncn = {
isNormalUser = true;
description = "mlncn";
extraGroups = [ "networkmanager" "wheel" "docker" ];
extraGroups = [ "networkmanager" "wheel" "docker" "scanner" "lp" ];
packages = with pkgs; [
discord
kdePackages.kate