nixos-configuration/modules/desktop/printing.nix
Vinzenz Schroeter 16c9d8e615 formatting
2024-07-21 14:10:41 +02:00

24 lines
493 B
Nix

{
config,
pkgs,
lib,
...
}: let
isEnabled = config.my.desktop.enablePrinting;
in {
options.my.desktop.enablePrinting = lib.mkEnableOption "printing";
config = lib.mkIf isEnabled {
services = {
# Enable CUPS to print documents.
printing.enable = true;
avahi = {
enable = true; # runs the Avahi daemon
nssmdns4 = true; # enables the mDNS NSS plug-in
openFirewall = true; # opens the firewall for UDP port 5353
};
};
};
}