mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-13 01:17:17 +00:00
28 lines
605 B
Nix
28 lines
605 B
Nix
{ config, lib, pkgs, ... }: let
|
|
inherit (lib) mkIf;
|
|
|
|
cfg = config.myOptions.workstation.printing;
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
# enable cups and add some drivers for common printers
|
|
services = {
|
|
printing = {
|
|
enable = true;
|
|
drivers = with pkgs; [
|
|
gutenprint
|
|
hplip
|
|
];
|
|
};
|
|
|
|
# required for network discovery of printers
|
|
avahi = {
|
|
enable = true;
|
|
# resolve .local domains for printers
|
|
nssmdns4 = true;
|
|
# open the avahi port(s) in the firewall
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
};
|
|
}
|