print and scan

This commit is contained in:
Daniel Langbein 2023-08-31 12:59:49 +02:00
parent b029b0d07c
commit bf0672c8f8
2 changed files with 32 additions and 3 deletions

View File

@ -9,6 +9,7 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./home-manager.nix
./print-and-scan.nix
];
# Bootloader.
@ -64,9 +65,6 @@
# Configure console keymap
console.keyMap = "de-latin1-nodeadkeys";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;

View File

@ -0,0 +1,31 @@
{ config, pkgs, ... }:
{
# Printing with IPP everywhere capable printers
# https://nixos.wiki/wiki/Printing
# Enable CUPS to print documents.
services.printing.enable = true;
# HP and Lexmark drivers
services.printing.drivers = [ pkgs.hplip pkgs.postscript-lexmark ];
services.avahi.enable = true;
services.avahi.nssmdns = true;
# WiFi printers
services.avahi.openFirewall = true;
# Scanning
# https://nixos.wiki/wiki/Scanners
# https://unix.stackexchange.com/questions/518687/how-do-i-set-up-scanning-from-an-hp-officejet-pro-on-nixos/518688
hardware.sane = {
enable = true;
# Optionally, add pkgs.sane-airscan for AirScan.
extraBackends = [ pkgs.hplip ];
};
users.users.yoda = {
extraGroups = [ "scanner" "lp" ];
packages = with pkgs; [
gnome.simple-scan
];
};
}