From 8dbf02f4cf2f866b62dca4cdfbaf8d3a2a8a0826 Mon Sep 17 00:00:00 2001 From: Jerry Starke <42114389+JerrySM64@users.noreply.github.com> Date: Thu, 8 Feb 2024 04:03:29 +0100 Subject: [PATCH] Add printer option --- config/system/default.nix | 1 + config/system/printer.nix | 13 +++++++++++++ options.nix | 1 + 3 files changed, 15 insertions(+) create mode 100644 config/system/printer.nix diff --git a/config/system/default.nix b/config/system/default.nix index fb108e3..5e6a50a 100644 --- a/config/system/default.nix +++ b/config/system/default.nix @@ -18,6 +18,7 @@ ./nvidia.nix ./packages.nix ./polkit.nix + ./printer.nix ./services.nix ./steam.nix ./vm.nix diff --git a/config/system/printer.nix b/config/system/printer.nix new file mode 100644 index 0000000..1771469 --- /dev/null +++ b/config/system/printer.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: + +let inherit (import ../../options.nix) printer; in +lib.mkIf (printer == true) { + services = { + printing.enable = true; + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; +} diff --git a/options.nix b/options.nix index fd7a987..8822e87 100644 --- a/options.nix +++ b/options.nix @@ -31,6 +31,7 @@ nfsDevice = "nas:/volume1/nas"; localHWClock = false; ntp = true; + printer = false; flatpak = false; kdenlive = true; blender = true;