diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 44e8fde6..2b96860b 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -24,5 +24,6 @@ ./plymouth # vpn ./wireguard + ./printing ]; } diff --git a/modules/desktop/printing/default.nix b/modules/desktop/printing/default.nix new file mode 100644 index 00000000..d327702b --- /dev/null +++ b/modules/desktop/printing/default.nix @@ -0,0 +1,27 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.desktop.printing; +in { + options.modules.desktop.printing = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + # enable printing itself + services.printing.enable = true; + + # autodiscovery of printers + services.avahi = { + enable = true; + nssmdns = true; + openFirewall = true; + }; + + }; +}