From e5956d1e57fe96e1afadd90e3b8eb580ee655803 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Thu, 11 Jul 2024 17:35:06 +0000 Subject: [PATCH] feat: add printing capabilities --- hosts/marr/configuration.nix | 2 ++ modules/default.nix | 1 + modules/printing.nix | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 modules/printing.nix diff --git a/hosts/marr/configuration.nix b/hosts/marr/configuration.nix index 0d4aadd..faedbd0 100644 --- a/hosts/marr/configuration.nix +++ b/hosts/marr/configuration.nix @@ -45,6 +45,8 @@ sway.enable = true; }; + services.printing.enable = true; + #: Virtualisation {{{ virtualisation.docker = { enable = true; diff --git a/modules/default.nix b/modules/default.nix index 46bb5a6..69a0764 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -14,5 +14,6 @@ ./home-manager.nix ./system/mime.nix ./env.nix + ./printing.nix ]; } diff --git a/modules/printing.nix b/modules/printing.nix new file mode 100644 index 0000000..2351c49 --- /dev/null +++ b/modules/printing.nix @@ -0,0 +1,17 @@ +{ + lib, + config, + pkgs, + ... +}: +lib.mkIf config.services.printing.enable { + services.avahi = { + enable = true; + nssmdns = true; + openFirewall = true; + }; + + services.printing = { + drivers = with pkgs; [ hplip ]; + }; +}