From c9c3e3f6cb81742a8a359cdea90186fc16672df5 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 23 Dec 2024 02:09:52 -0800 Subject: [PATCH] feat: add printing module --- modules/linux/misc/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 modules/linux/misc/default.nix diff --git a/modules/linux/misc/default.nix b/modules/linux/misc/default.nix new file mode 100644 index 0000000..3780248 --- /dev/null +++ b/modules/linux/misc/default.nix @@ -0,0 +1,25 @@ +{ config, lib, ... }: +let + cfg = config.liminalOS.system.printing; +in +{ + options.liminalOS.system.printing = { + enable = lib.mkOption { + type = lib.types.bool; + default = config.liminalOS.enable; + description = '' + Whether to set up default options for printing and printer discover on UNIX. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + services.printing.enable = true; + + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; +}