nix-dotfiles/modules/hardware/print.nix
2024-11-14 10:47:24 -08:00

30 lines
714 B
Nix

{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.modules.hardware.print;
in {
options.modules.hardware.print = {
enable = mkEnableOption "Enable various print services";
};
config = mkIf cfg.enable {
services.printing.enable = true;
services.printing.startWhenNeeded = true; # i am not the avid printer user
services.printing.browsed.enable = true;
services.printing.drivers = with pkgs; [
# gutenprint is very generic and supports a lot of printers
gutenprint
gutenprintBin
# brother laser printers
brlaser
];
# network discovery
services.avahi = {
enable = true;
openFirewall = true;
nssmdns4 = true;
};
};
}