grimm-nixos-laptop/common/printing.nix
LordGrimmauld 984fe942d3 odds and ends
- switch to swaync
- skanpage only on gui setups
- relatime mounting
- firefox hardware accelforce enabled in config
2024-04-22 11:04:46 +02:00

29 lines
779 B
Nix

{ pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in
{
config = with cfg; lib.mkIf (enable && printing) {
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.drivers = with pkgs; [ brgenml1lpr brgenml1cupswrapper ];
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
services.printing.cups-pdf.enable = true;
hardware.sane.brscan4.enable = true; # enables support for SANE scanners
environment.systemPackages = with pkgs; (lib.optionals cfg.graphical [
kdePackages.skanpage
]);
};
options.grimmShared.printing = with lib; mkOption {
type = types.bool;
default = false;
description = "Enables print and scan related options";
};
}